Minor improvement to prior commit.
[openemr.git] / phpmyadmin / libraries / plugins / SchemaPlugin.class.php
blob1fc17f6024f963ea0951dd3002655535c1547d77
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Abstract class for the schema export plugins
6 * @package PhpMyAdmin
7 */
8 if (! defined('PHPMYADMIN')) {
9 exit;
12 /**
13 * Provides a common interface that will have to be implemented by all of the
14 * schema export plugins. Some of the plugins will also implement other public
15 * methods, but those are not declared here, because they are not implemented
16 * by all export plugins.
18 * @package PhpMyAdmin
20 abstract class SchemaPlugin
22 /**
23 * SchemaPluginProperties object containing
24 * the specific schema export plugin type properties
26 * @var SchemaPluginProperties
28 protected $properties;
30 /**
31 * Gets the export specific format plugin properties
33 * @return SchemaPluginProperties
35 public function getProperties()
37 return $this->properties;
40 /**
41 * Sets the export plugins properties and is implemented by
42 * each schema export plugin
44 * @return void
46 protected abstract function setProperties();
48 /**
49 * Exports the schema into the specified format.
51 * @param string $db database name
53 * @return bool Whether it succeeded
55 public abstract function exportSchema($db);
57 /**
58 * Adds export options common to all plugins.
60 * @param OptionsPropertyMainGroup $propertyGroup property group
62 * @return void
64 protected function addCommonOptions(OptionsPropertyMainGroup $propertyGroup)
66 $leaf = new BoolPropertyItem();
67 $leaf->setName('show_color');
68 $leaf->setText(__('Show color'));
69 $propertyGroup->addProperty($leaf);
70 $leaf = new BoolPropertyItem();
71 $leaf->setName('show_keys');
72 $leaf->setText(__('Only show keys'));
73 $propertyGroup->addProperty($leaf);