PropertyItem.php 1.3 KB

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