Upgraded phpmyadmin to 4.0.4 (All Languages) - No modifications yet
[openemr.git] / phpmyadmin / libraries / plugins / transformations / abstract / LongToIPv4TransformationsPlugin.class.php
blob58dda957e87ee435a7360eb2a7788fca6a2bccd7
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Abstract class for the long to IPv4 transformations plugins
6 * @package PhpMyAdmin-Transformations
7 * @subpackage LongToIPv4
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 long to IPv4 transformations plugins.
19 * @package PhpMyAdmin
21 abstract class LongToIPv4TransformationsPlugin extends TransformationsPlugin
23 /**
24 * Gets the transformation description of the specific plugin
26 * @return string
28 public static function getInfo()
30 return __(
31 'Converts an (IPv4) Internet network address into a string in'
32 . ' Internet standard dotted format.'
36 /**
37 * Does the actual work of each specific transformations plugin.
39 * @param string $buffer text to be transformed
40 * @param array $options transformation options
41 * @param string $meta meta information
43 * @return void
45 public function applyTransformation($buffer, $options = array(), $meta = '')
47 if ($buffer < 0 || $buffer > 4294967295) {
48 return $buffer;
51 return long2ip($buffer);
54 /**
55 * This method is called when any PluginManager to which the observer
56 * is attached calls PluginManager::notify()
58 * @param SplSubject $subject The PluginManager notifying the observer
59 * of an update.
61 * @todo implement
62 * @return void
64 public function update (SplSubject $subject)
70 /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
73 /**
74 * Gets the transformation name of the specific plugin
76 * @return string
78 public static function getName()
80 return "Long To IPv4";