TransformationsPlugin.class.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Abstract class for the transformations plugins
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. if (! defined('PHPMYADMIN')) {
  9. exit;
  10. }
  11. /* It extends the PluginObserver abstract class */
  12. require_once 'PluginObserver.class.php';
  13. /* It also implements the transformations interface */
  14. require_once 'TransformationsInterface.int.php';
  15. /**
  16. * Extends PluginObserver and provides a common interface that will have to
  17. * be implemented by all of the transformations plugins.
  18. *
  19. * @package PhpMyAdmin
  20. */
  21. abstract class TransformationsPlugin extends PluginObserver
  22. implements TransformationsInterface
  23. {
  24. /**
  25. * Does the actual work of each specific transformations plugin.
  26. *
  27. * @param array $options transformation options
  28. *
  29. * @return void
  30. */
  31. public function applyTransformationNoWrap($options = array())
  32. {
  33. ;
  34. }
  35. /**
  36. * Does the actual work of each specific transformations plugin.
  37. *
  38. * @param string $buffer text to be transformed
  39. * @param array $options transformation options
  40. * @param string $meta meta information
  41. *
  42. * @return void
  43. */
  44. abstract public function applyTransformation($buffer, $options = array(), $meta = '');
  45. }
  46. ?>