Upgraded phpmyadmin to 4.0.4 (All Languages) - No modifications yet
[openemr.git] / phpmyadmin / libraries / plugins / transformations / TEMPLATE_ABSTRACT
blob5cc1d26bd00711b7e423e81060e086296542c2bd
1 <?php
2 // vim: expandtab sw=4 ts=4 sts=4:
3 /**
4  * This file contains the basic structure for an abstract class defining a
5  * transformation.
6  * For instructions, read the documentation
7  *
8  * @package    PhpMyAdmin-Transformations
9  * @subpackage [TransformationName]
10  */
11 if (! defined('PHPMYADMIN')) {
12     exit;
15 /* Get the transformations interface */
16 require_once 'libraries/plugins/TransformationsPlugin.class.php';
18 /**
19  * Provides common methods for all of the [TransformationName] transformations plugins.
20  *
21  * @package PhpMyAdmin
22  */
23 abstract class [TransformationName]TransformationsPlugin
24     extends TransformationsPlugin
26     /**
27      * Gets the transformation description of the specific plugin
28      *
29      * @return string
30      */
31     public static function getInfo()
32     {
33         return __(
34             'Description of the transformation.'
35         );
36     }
38     /**
39      * Does the actual work of each specific transformations plugin.
40      *
41      * @param string $buffer  text to be transformed
42      * @param array  $options transformation options
43      * @param string $meta    meta information
44      *
45      * @return void
46      */
47     public function applyTransformation($buffer, $options = array(), $meta = '')
48     {
49         // possibly use a global transform and feed it with special options
51         // further operations on $buffer using the $options[] array.
53         // You can evaluate the propagated $meta Object. It's contained fields are described in http://www.php.net/mysql_fetch_field.
54         // This stored information can be used to get the field information about the transformed field.
55         // $meta->mimetype contains the original MimeType of the field (i.e. 'text/plain', 'image/jpeg' etc.)
57         return $buffer;
58     }
60     /**
61      * This method is called when any PluginManager to which the observer
62      * is attached calls PluginManager::notify()
63      *
64      * @param SplSubject $subject The PluginManager notifying the observer
65      *                            of an update.
66      *
67      * @todo implement
68      * @return void
69      */
70     public function update (SplSubject $subject)
71     {
72         ;
73     }
76     /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
79     /**
80      * Gets the TransformationName of the specific plugin
81      *
82      * @return string
83      */
84     public static function getName()
85     {
86         return "[TransformationName]";
87     }