2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Abstract class for the schema export plugins
8 if (! defined('PHPMYADMIN')) {
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.
20 abstract class SchemaPlugin
23 * SchemaPluginProperties object containing
24 * the specific schema export plugin type properties
26 * @var SchemaPluginProperties
28 protected $properties;
31 * Gets the export specific format plugin properties
33 * @return SchemaPluginProperties
35 public function getProperties()
37 return $this->properties
;
41 * Sets the export plugins properties and is implemented by
42 * each schema export plugin
46 protected abstract function setProperties();
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);
58 * Adds export options common to all plugins.
60 * @param OptionsPropertyMainGroup $propertyGroup property group
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);