Upgraded phpmyadmin to 4.0.4 (All Languages) - No modifications yet
[openemr.git] / phpmyadmin / libraries / plugins / transformations / abstract / ImageLinkTransformationsPlugin.class.php
blob456f102bd1ece335ff6976fd4d14aa74db90041c
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Abstract class for the link transformations plugins
6 * @package PhpMyAdmin-Transformations
7 * @subpackage Link
8 */
9 if (! defined('PHPMYADMIN')) {
10 exit;
13 /* Get the transformations interface */
14 require_once 'libraries/plugins/TransformationsPlugin.class.php';
15 /* For PMA_transformation_global_html_replace */
16 require_once 'libraries/transformations.lib.php';
18 /**
19 * Provides common methods for all of the link transformations plugins.
21 * @package PhpMyAdmin
23 abstract class ImageLinkTransformationsPlugin extends TransformationsPlugin
25 /**
26 * Gets the transformation description of the specific plugin
28 * @return string
30 public static function getInfo()
32 return __(
33 'Displays a link to download this image.'
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 $transform_options = array (
49 'string' => '<a href="transformation_wrapper.php'
50 . $options['wrapper_link'] . '" alt="[__BUFFER__]">[BLOB]</a>'
52 $buffer = PMA_transformation_global_html_replace(
53 $buffer,
54 $transform_options
57 return $buffer;
60 /**
61 * This method is called when any PluginManager to which the observer
62 * is attached calls PluginManager::notify()
64 * @param SplSubject $subject The PluginManager notifying the observer
65 * of an update.
67 * @todo implement
68 * @return void
70 public function update (SplSubject $subject)
76 /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
79 /**
80 * Gets the transformation name of the specific plugin
82 * @return string
84 public static function getName()
86 return "Link";