oop: transformations backbone

This commit is contained in:
Alex Marin 2012-06-07 14:57:14 +03:00
parent d30bd45c95
commit 1e4b0cd0dd
26 changed files with 1628 additions and 0 deletions

View File

@ -0,0 +1,60 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Application OctetStream Download Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage Download
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the download transformations interface */
require_once "libraries/plugins/abstract/DownloadTransformationsPlugin.class.php";
/**
* Handles the download transformation for application octetstream
*
* @package PhpMyAdmin
*/
class TransformationApplicationOctetStreamDownload
extends DownloadTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Displays a link to download the binary data of the column. You can'
. ' use the first option to specify the filename, or use the second'
. ' option as the name of a column which contains the filename. If'
. ' you use the second option, you need to set the first option to'
. ' the empty string.'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Application";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "OctetStream";
}
}
?>

View File

@ -0,0 +1,58 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Application OctetStream Hex Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage Hex
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the hex transformations interface */
require_once "libraries/plugins/abstract/HexTransformationsPlugin.class.php";
/**
* Handles the hex transformation for application octetstream
*
* @package PhpMyAdmin
*/
class TransformationApplicationOctetStreamHex
extends HexTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Displays hexadecimal representation of data. Optional first'
. ' parameter specifies how often space will be added (defaults'
. ' to 2 nibbles).'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Application";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "OctetStream";
}
}
?>

View File

@ -0,0 +1,57 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Image JPEG Inline Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage Inline
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the inline transformations interface */
require_once "libraries/plugins/abstract/InlineTransformationsPlugin.class.php";
/**
* Handles the inline transformation for image jpeg
*
* @package PhpMyAdmin
*/
class TransformationImageJPEGInline
extends InlineTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Displays a clickable thumbnail. The options are the maximum width'
. ' and height in pixels. The original aspect ratio is preserved.'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Image";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "JPEG";
}
}
?>

View File

@ -0,0 +1,56 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Image JPEG Link Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage Link
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the link transformations interface */
require_once "libraries/plugins/abstract/LinkTransformationsPlugin.class.php";
/**
* Handles the link transformation for image jpeg
*
* @package PhpMyAdmin
*/
class TransformationImageJPEGLink
extends LinkTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Displays a link to download this image.'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Image";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "JPEG";
}
}
?>

View File

@ -0,0 +1,57 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Image PNG Inline Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage Inline
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the inline transformations interface */
require_once "libraries/plugins/abstract/InlineTransformationsPlugin.class.php";
/**
* Handles the inline transformation for image png
*
* @package PhpMyAdmin
*/
class TransformationImagePNGInline
extends InlineTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Displays a clickable thumbnail. The options are the maximum width'
. ' and height in pixels. The original aspect ratio is preserved.'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Image";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "PNG";
}
}
?>

View File

@ -0,0 +1,58 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Text Plain Append Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage Append
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the append transformations interface */
require_once "libraries/plugins/abstract/AppendTransformationsPlugin.class.php";
/**
* Handles the append transformation for text plain.
* Has one option: the text to be appended (default '')
*
* @package PhpMyAdmin
*/
class TransformationTextPlainAppend
extends AppendTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Appends text to a string. The only option is the text to be appended'
. ' (enclosed in single quotes, default empty string).'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Text";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "Plain";
}
}
?>

View File

@ -0,0 +1,64 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Text Plain Date Format Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage Date Format
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the date format transformations interface */
require_once "libraries/plugins/abstract/DateFormatTransformationsPlugin.class.php";
/**
* Handles the date format transformation for text plain
*
* @package PhpMyAdmin
*/
class TransformationTextPlainDateFormat
extends DateFormatTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Displays a TIME, TIMESTAMP, DATETIME or numeric unix timestamp'
. ' column as formatted date. The first option is the offset (in'
. ' hours) which will be added to the timestamp (Default: 0). Use'
. ' second option to specify a different date/time format string.'
. ' Third option determines whether you want to see local date or'
. ' UTC one (use "local" or "utc" strings) for that. According to'
. ' that, date format has different value - for "local" see the'
. ' documentation for PHP\'s strftime() function and for "utc" it'
. ' is done using gmdate() function.'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Text";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "Plain";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Text Plain External Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage External
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the external transformations interface */
require_once "libraries/plugins/abstract/ExternalTransformationsPlugin.class.php";
/**
* Handles the external transformation for text plain
*
* @package PhpMyAdmin
*/
class TransformationTextPlainExternal
extends ExternalTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'LINUX ONLY: Launches an external application and feeds it the column'
. ' data via standard input. Returns the standard output of the'
. ' application. The default is Tidy, to pretty-print HTML code.'
. ' For security reasons, you have to manually edit the file'
. ' libraries/plugins/transformations/TransformationTextPlainExternal'
. '.class.php and list the tools you want to make available.'
. ' The first option is then the number of the program you want to'
. ' use and the second option is the parameters for the program.'
. ' The third option, if set to 1, will convert the output using'
. ' htmlspecialchars() (Default 1). The fourth option, if set to 1,'
. ' will prevent wrapping and ensure that the output appears all on'
. ' one line (Default 1).'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Text";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "Plain";
}
}
?>

View File

@ -0,0 +1,58 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Text Plain Formatted Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage Formatted
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the formatted transformations interface */
require_once "libraries/plugins/abstract/FormattedTransformationsPlugin.class.php";
/**
* Handles the formatted transformation for text plain
*
* @package PhpMyAdmin
*/
class TransformationTextPlainFormatted
extends FormattedTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Displays the contents of the column as-is, without running it'
. ' through htmlspecialchars(). That is, the column is assumed'
. ' to contain valid HTML.'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Text";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "Plain";
}
}
?>

View File

@ -0,0 +1,58 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Text Plain Image Link Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage Image Link
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the image link transformations interface */
require_once "libraries/plugins/abstract/ImageLinkTransformationsPlugin.class.php";
/**
* Handles the image link transformation for text plain
*
* @package PhpMyAdmin
*/
class TransformationTextPlainImageLink
extends ImageLinkTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Displays an image and a link; the column contains the filename. The'
. ' first option is a URL prefix like "http://www.example.com/". The'
. ' second and third options are the width and the height in pixels.'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Text";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "Plain";
}
}
?>

View File

@ -0,0 +1,58 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Text Plain Link Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage Link
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the link transformations interface */
require_once "libraries/plugins/abstract/LinkTransformationsPlugin.class.php";
/**
* Handles the link transformation for text plain
*
* @package PhpMyAdmin
*/
class TransformationTextPlainLink
extends LinkTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Displays a link; the column contains the filename. The first option'
. ' is a URL prefix like "http://www.example.com/". The second option'
. ' is a title for the link.'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Text";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "Plain";
}
}
?>

View File

@ -0,0 +1,57 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Text Plain Long To IPv4 Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage Long To IPv4
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the long to ipv4 transformations interface */
require_once "libraries/plugins/abstract/LongToIPv4TransformationsPlugin.class.php";
/**
* Handles the long to ipv4 transformation for text plain
*
* @package PhpMyAdmin
*/
class TransformationTextPlainLongToIPv4
extends LongToIPv4TransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Converts an (IPv4) Internet network address into a string in'
. ' Internet standard dotted format.'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Text";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "Plain";
}
}
?>

View File

@ -0,0 +1,56 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Text Plain SQL Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage SQL
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the sql transformations interface */
require_once "libraries/plugins/abstract/SQLTransformationsPlugin.class.php";
/**
* Handles the sql transformation for text plain
*
* @package PhpMyAdmin
*/
class TransformationTextPlainSQL
extends SQLTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Formats text as SQL query with syntax highlighting.'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Text";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "Plain";
}
}
?>

View File

@ -0,0 +1,60 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Text Plain Substring Transformations plugin for phpMyAdmin
*
* @package PhpMyAdmin-Transformations
* @subpackage Substring
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the substring transformations interface */
require_once "libraries/plugins/abstract/SubstringTransformationsPlugin.class.php";
/**
* Handles the substring transformation for text plain
*
* @package PhpMyAdmin
*/
class TransformationTextPlainSubstring
extends SubstringTransformationsPlugin
{
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public function getInfo()
{
return __(
'Displays a part of a string. The first option is the number of'
. ' characters to skip from the beginning of the string (Default 0).'
. ' The second option is the number of characters to return (Default:'
. ' until end of string). The third option is the string to append'
. ' and/or prepend when truncation occurs (Default: "...").'
);
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public function getMIMEType()
{
return "Text";
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public function getMIMESubtype()
{
return "Plain";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Abstract class for the append transformations plugins
*
* @package PhpMyAdmin-Transformations
* @subpackage Append
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once "libraries/plugins/TransformationsPlugin.class.php";
/**
* Provides common methods for all of the append transformations plugins.
*
* @package PhpMyAdmin
*/
abstract class AppendTransformationsPlugin extends PluginObserver
{
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param string $meta meta information
*
* @todo implement
* @return void
*/
public function applyTransformation($buffer, $options, $meta)
{
;
}
/**
* This method is called when any PluginManager to which the observer
* is attached calls PluginManager::notify()
*
* @param SplSubject $subject The PluginManager notifying the observer
* of an update.
*
* @todo implement
* @return void
*/
public function update (SplSubject $subject)
{
;
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public function getName()
{
return "Append";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Abstract class for the date format transformations plugins
*
* @package PhpMyAdmin-Transformations
* @subpackage Date Format
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once "libraries/plugins/TransformationsPlugin.class.php";
/**
* Provides common methods for all of the date format transformations plugins.
*
* @package PhpMyAdmin
*/
abstract class DateFormatTransformationsPlugin extends PluginObserver
{
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param string $meta meta information
*
* @todo implement
* @return void
*/
public function applyTransformation($buffer, $options, $meta)
{
;
}
/**
* This method is called when any PluginManager to which the observer
* is attached calls PluginManager::notify()
*
* @param SplSubject $subject The PluginManager notifying the observer
* of an update.
*
* @todo implement
* @return void
*/
public function update (SplSubject $subject)
{
;
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public function getName()
{
return "Date Format";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Abstract class for the download transformations plugins
*
* @package PhpMyAdmin-Transformations
* @subpackage Download
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once "libraries/plugins/TransformationsPlugin.class.php";
/**
* Provides common methods for all of the download transformations plugins.
*
* @package PhpMyAdmin
*/
abstract class DownloadTransformationsPlugin extends PluginObserver
{
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param string $meta meta information
*
* @todo implement
* @return void
*/
public function applyTransformation($buffer, $options, $meta)
{
;
}
/**
* This method is called when any PluginManager to which the observer
* is attached calls PluginManager::notify()
*
* @param SplSubject $subject The PluginManager notifying the observer
* of an update.
*
* @todo implement
* @return void
*/
public function update (SplSubject $subject)
{
;
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public function getName()
{
return "Download";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Abstract class for the external transformations plugins
*
* @package PhpMyAdmin-Transformations
* @subpackage External
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once "libraries/plugins/TransformationsPlugin.class.php";
/**
* Provides common methods for all of the external transformations plugins.
*
* @package PhpMyAdmin
*/
abstract class ExternalTransformationsPlugin extends PluginObserver
{
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param string $meta meta information
*
* @todo implement
* @return void
*/
public function applyTransformation($buffer, $options, $meta)
{
;
}
/**
* This method is called when any PluginManager to which the observer
* is attached calls PluginManager::notify()
*
* @param SplSubject $subject The PluginManager notifying the observer
* of an update.
*
* @todo implement
* @return void
*/
public function update (SplSubject $subject)
{
;
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public function getName()
{
return "External";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Abstract class for the formatted transformations plugins
*
* @package PhpMyAdmin-Transformations
* @subpackage Formatted
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once "libraries/plugins/TransformationsPlugin.class.php";
/**
* Provides common methods for all of the formatted transformations plugins.
*
* @package PhpMyAdmin
*/
abstract class FormattedTransformationsPlugin extends PluginObserver
{
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param string $meta meta information
*
* @todo implement
* @return void
*/
public function applyTransformation($buffer, $options, $meta)
{
;
}
/**
* This method is called when any PluginManager to which the observer
* is attached calls PluginManager::notify()
*
* @param SplSubject $subject The PluginManager notifying the observer
* of an update.
*
* @todo implement
* @return void
*/
public function update (SplSubject $subject)
{
;
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public function getName()
{
return "Formatted";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Abstract class for the hex transformations plugins
*
* @package PhpMyAdmin-Transformations
* @subpackage Hex
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once "libraries/plugins/TransformationsPlugin.class.php";
/**
* Provides common methods for all of the hex transformations plugins.
*
* @package PhpMyAdmin
*/
abstract class HexTransformationsPlugin extends PluginObserver
{
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param string $meta meta information
*
* @todo implement
* @return void
*/
public function applyTransformation($buffer, $options, $meta)
{
;
}
/**
* This method is called when any PluginManager to which the observer
* is attached calls PluginManager::notify()
*
* @param SplSubject $subject The PluginManager notifying the observer
* of an update.
*
* @todo implement
* @return void
*/
public function update (SplSubject $subject)
{
;
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public function getName()
{
return "Hex";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Abstract class for the image link transformations plugins
*
* @package PhpMyAdmin-Transformations
* @subpackage Image Link
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once "libraries/plugins/TransformationsPlugin.class.php";
/**
* Provides common methods for all of the image link transformations plugins.
*
* @package PhpMyAdmin
*/
abstract class ImageLinkTransformationsPlugin extends PluginObserver
{
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param string $meta meta information
*
* @todo implement
* @return void
*/
public function applyTransformation($buffer, $options, $meta)
{
;
}
/**
* This method is called when any PluginManager to which the observer
* is attached calls PluginManager::notify()
*
* @param SplSubject $subject The PluginManager notifying the observer
* of an update.
*
* @todo implement
* @return void
*/
public function update (SplSubject $subject)
{
;
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public function getName()
{
return "Image Link";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Abstract class for the inline transformations plugins
*
* @package PhpMyAdmin-Transformations
* @subpackage Inline
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once "libraries/plugins/TransformationsPlugin.class.php";
/**
* Provides common methods for all of the inline transformations plugins.
*
* @package PhpMyAdmin
*/
abstract class InlineTransformationsPlugin extends PluginObserver
{
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param string $meta meta information
*
* @todo implement
* @return void
*/
public function applyTransformation($buffer, $options, $meta)
{
;
}
/**
* This method is called when any PluginManager to which the observer
* is attached calls PluginManager::notify()
*
* @param SplSubject $subject The PluginManager notifying the observer
* of an update.
*
* @todo implement
* @return void
*/
public function update (SplSubject $subject)
{
;
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public function getName()
{
return "Inline";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Abstract class for the link transformations plugins
*
* @package PhpMyAdmin-Transformations
* @subpackage Link
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once "libraries/plugins/TransformationsPlugin.class.php";
/**
* Provides common methods for all of the link transformations plugins.
*
* @package PhpMyAdmin
*/
abstract class LinkTransformationsPlugin extends PluginObserver
{
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param string $meta meta information
*
* @todo implement
* @return void
*/
public function applyTransformation($buffer, $options, $meta)
{
;
}
/**
* This method is called when any PluginManager to which the observer
* is attached calls PluginManager::notify()
*
* @param SplSubject $subject The PluginManager notifying the observer
* of an update.
*
* @todo implement
* @return void
*/
public function update (SplSubject $subject)
{
;
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public function getName()
{
return "Link";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Abstract class for the long to IPv4 transformations plugins
*
* @package PhpMyAdmin-Transformations
* @subpackage Long To IPv4
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once "libraries/plugins/TransformationsPlugin.class.php";
/**
* Provides common methods for all of the long to IPv4 transformations plugins.
*
* @package PhpMyAdmin
*/
abstract class LongToIPv4TransformationsPlugin extends PluginObserver
{
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param string $meta meta information
*
* @todo implement
* @return void
*/
public function applyTransformation($buffer, $options, $meta)
{
;
}
/**
* This method is called when any PluginManager to which the observer
* is attached calls PluginManager::notify()
*
* @param SplSubject $subject The PluginManager notifying the observer
* of an update.
*
* @todo implement
* @return void
*/
public function update (SplSubject $subject)
{
;
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public function getName()
{
return "Long To IPv4";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Abstract class for the SQL transformations plugins
*
* @package PhpMyAdmin-Transformations
* @subpackage SQL
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once "libraries/plugins/TransformationsPlugin.class.php";
/**
* Provides common methods for all of the SQL transformations plugins.
*
* @package PhpMyAdmin
*/
abstract class SQLTransformationsPlugin extends PluginObserver
{
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param string $meta meta information
*
* @todo implement
* @return void
*/
public function applyTransformation($buffer, $options, $meta)
{
;
}
/**
* This method is called when any PluginManager to which the observer
* is attached calls PluginManager::notify()
*
* @param SplSubject $subject The PluginManager notifying the observer
* of an update.
*
* @todo implement
* @return void
*/
public function update (SplSubject $subject)
{
;
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public function getName()
{
return "SQL";
}
}
?>

View File

@ -0,0 +1,67 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Abstract class for the substring transformations plugins
*
* @package PhpMyAdmin-Transformations
* @subpackage Substring
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/* Get the transformations interface */
require_once "libraries/plugins/TransformationsPlugin.class.php";
/**
* Provides common methods for all of the substring transformations plugins.
*
* @package PhpMyAdmin
*/
abstract class SubstringTransformationsPlugin extends PluginObserver
{
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param string $meta meta information
*
* @todo implement
* @return void
*/
public function applyTransformation($buffer, $options, $meta)
{
;
}
/**
* This method is called when any PluginManager to which the observer
* is attached calls PluginManager::notify()
*
* @param SplSubject $subject The PluginManager notifying the observer
* of an update.
*
* @todo implement
* @return void
*/
public function update (SplSubject $subject)
{
;
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public function getName()
{
return "Substring";
}
}
?>