2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Abstract class for the SQL transformations plugins
6 * @package PhpMyAdmin-Transformations
9 if (! defined('PHPMYADMIN')) {
13 /* Get the transformations interface */
14 require_once 'libraries/plugins/TransformationsPlugin.class.php';
17 * Provides common methods for all of the SQL transformations plugins.
21 abstract class SQLTransformationsPlugin
extends TransformationsPlugin
24 * Gets the transformation description of the specific plugin
28 public static function getInfo()
31 'Formats text as SQL query with syntax highlighting.'
36 * Does the actual work of each specific transformations plugin.
38 * @param string $buffer text to be transformed
39 * @param array $options transformation options
40 * @param string $meta meta information
44 public function applyTransformation($buffer, $options = array(), $meta = '')
46 $result = PMA_SQP_formatHtml(PMA_SQP_parse($buffer));
47 // Need to clear error state not to break subsequent queries display.
53 * This method is called when any PluginManager to which the observer
54 * is attached calls PluginManager::notify()
56 * @param SplSubject $subject The PluginManager notifying the observer
62 public function update (SplSubject
$subject)
68 /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
72 * Gets the transformation name of the specific plugin
76 public static function getName()