PropertyItem.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * The top-level class of the object-oriented properties system.
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. namespace PhpMyAdmin\Properties;
  9. /**
  10. * Provides an interface for Property classes
  11. *
  12. * @package PhpMyAdmin
  13. */
  14. abstract class PropertyItem
  15. {
  16. /**
  17. * Returns the property type ( either "Options", or "Plugin" ).
  18. *
  19. * @return string
  20. */
  21. public abstract function getPropertyType();
  22. /**
  23. * Returns the property item type of either an instance of
  24. * - PhpMyAdmin\Properties\Options\OptionsPropertyOneItem ( f.e. "bool", "text", "radio", etc ) or
  25. * - PhpMyAdmin\Properties\Options\OptionsPropertyGroup ( "root", "main" or "subgroup" )
  26. * - PhpMyAdmin\Properties\Plugins\PluginPropertyItem ( "export", "import", "transformations" )
  27. *
  28. * @return string
  29. */
  30. public abstract function getItemType();
  31. /**
  32. * Only overwritten in the PhpMyAdmin\Properties\Options\OptionsPropertyGroup class:
  33. * Used to tell whether we can use the current item as a group by calling
  34. * the addProperty() or removeProperty() methods, which are not available
  35. * for simple PhpMyAdmin\Properties\Options\OptionsPropertyOneItem subclasses.
  36. *
  37. * @return string
  38. */
  39. public function getGroup()
  40. {
  41. return null;
  42. }
  43. }