2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Abstract class for the long to IPv4 transformations plugins
6 * @package PhpMyAdmin-Transformations
7 * @subpackage LongToIPv4
9 if (! defined('PHPMYADMIN')) {
13 /* Get the transformations interface */
14 require_once 'libraries/plugins/TransformationsPlugin.class.php';
17 * Provides common methods for all of the long to IPv4 transformations plugins.
21 abstract class LongToIPv4TransformationsPlugin
extends TransformationsPlugin
24 * Gets the transformation description of the specific plugin
28 public static function getInfo()
31 'Converts an (IPv4) Internet network address into a string in'
32 . ' Internet standard dotted format.'
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
45 public function applyTransformation($buffer, $options = array(), $meta = '')
47 if ($buffer < 0 ||
$buffer > 4294967295) {
51 return long2ip($buffer);
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
64 public function update (SplSubject
$subject)
70 /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
74 * Gets the transformation name of the specific plugin
78 public static function getName()
80 return "Long To IPv4";