From 04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 9 Jan 2020 10:55:03 +0100 Subject: phpmyadmin working --- .../libraries/classes/Plugins/SchemaPlugin.php | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 srcs/phpmyadmin/libraries/classes/Plugins/SchemaPlugin.php (limited to 'srcs/phpmyadmin/libraries/classes/Plugins/SchemaPlugin.php') diff --git a/srcs/phpmyadmin/libraries/classes/Plugins/SchemaPlugin.php b/srcs/phpmyadmin/libraries/classes/Plugins/SchemaPlugin.php new file mode 100644 index 0000000..12cbd40 --- /dev/null +++ b/srcs/phpmyadmin/libraries/classes/Plugins/SchemaPlugin.php @@ -0,0 +1,90 @@ +properties; + } + + /** + * Sets the export plugins properties and is implemented by + * each schema export plugin + * + * @return void + */ + abstract protected function setProperties(); + + /** + * Exports the schema into the specified format. + * + * @param string $db database name + * + * @return bool Whether it succeeded + */ + abstract public function exportSchema($db); + + /** + * Adds export options common to all plugins. + * + * @param OptionsPropertyMainGroup $propertyGroup property group + * + * @return void + */ + protected function addCommonOptions(OptionsPropertyMainGroup $propertyGroup) + { + $leaf = new BoolPropertyItem('show_color', __('Show color')); + $propertyGroup->addProperty($leaf); + $leaf = new BoolPropertyItem('show_keys', __('Only show keys')); + $propertyGroup->addProperty($leaf); + } + + /** + * Returns the array of paper sizes + * + * @return array array of paper sizes + */ + protected function getPaperSizeArray() + { + $ret = []; + foreach ($GLOBALS['cfg']['PDFPageSizes'] as $val) { + $ret[$val] = $val; + } + + return $ret; + } +} -- cgit