Upgraded phpmyadmin to 4.0.4 (All Languages) - No modifications yet
[openemr.git] / phpmyadmin / libraries / plugins / transformations / abstract / AppendTransformationsPlugin.class.php
blob0fc3b4de77135ddf118f9172b6217695e62c0c5d
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Abstract class for the append transformations plugins
6 * @package PhpMyAdmin-Transformations
7 * @subpackage Append
8 */
9 if (! defined('PHPMYADMIN')) {
10 exit;
13 /* Get the transformations interface */
14 require_once 'libraries/plugins/TransformationsPlugin.class.php';
16 /**
17 * Provides common methods for all of the append transformations plugins.
19 * @package PhpMyAdmin-Transformations
20 * @subpackage Append
22 abstract class AppendTransformationsPlugin extends TransformationsPlugin
24 /**
25 * Gets the transformation description of the specific plugin
27 * @return string
29 public static function getInfo()
31 return __(
32 'Appends text to a string. The only option is the text to be appended'
33 . ' (enclosed in single quotes, default empty string).'
37 /**
38 * Does the actual work of each specific transformations plugin.
40 * @param string $buffer text to be transformed
41 * @param array $options transformation options
42 * @param string $meta meta information
44 * @return void
46 public function applyTransformation($buffer, $options = array(), $meta = '')
48 if (! isset($options[0]) || $options[0] == '') {
49 $options[0] = '';
51 //just append the option to the original text
52 $newtext = $buffer . htmlspecialchars($options[0]);
54 return $newtext;
57 /**
58 * This method is called when any PluginManager to which the observer
59 * is attached calls PluginManager::notify()
61 * @param SplSubject $subject The PluginManager notifying the observer
62 * of an update.
64 * @todo implement
65 * @return void
67 public function update (SplSubject $subject)
73 /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
76 /**
77 * Gets the transformation name of the specific plugin
79 * @return string
81 public static function getName()
83 return "Append";