PluginPropertyItem.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * The top-level class of the "Plugin" subtree of the object-oriented
  5. * properties system (the other subtree is "Options").
  6. *
  7. * @package PhpMyAdmin
  8. */
  9. declare(strict_types=1);
  10. namespace PhpMyAdmin\Properties\Plugins;
  11. use PhpMyAdmin\Properties\Options\Groups\OptionsPropertyRootGroup;
  12. use PhpMyAdmin\Properties\PropertyItem;
  13. /**
  14. * Superclass for
  15. * - PhpMyAdmin\Properties\Plugins\ExportPluginProperties,
  16. * - PhpMyAdmin\Properties\Plugins\ImportPluginProperties and
  17. * - TransformationsPluginProperties
  18. *
  19. * @package PhpMyAdmin
  20. */
  21. abstract class PluginPropertyItem extends PropertyItem
  22. {
  23. /**
  24. * Text
  25. *
  26. * @var string
  27. */
  28. private $_text;
  29. /**
  30. * Extension
  31. *
  32. * @var string
  33. */
  34. private $_extension;
  35. /**
  36. * Options
  37. *
  38. * @var OptionsPropertyRootGroup
  39. */
  40. private $_options;
  41. /**
  42. * Options text
  43. *
  44. * @var string
  45. */
  46. private $_optionsText;
  47. /**
  48. * MIME Type
  49. *
  50. * @var string
  51. */
  52. private $_mimeType;
  53. /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
  54. /**
  55. * Gets the text
  56. *
  57. * @return string
  58. */
  59. public function getText()
  60. {
  61. return $this->_text;
  62. }
  63. /**
  64. * Sets the text
  65. *
  66. * @param string $text text
  67. *
  68. * @return void
  69. */
  70. public function setText($text)
  71. {
  72. $this->_text = $text;
  73. }
  74. /**
  75. * Gets the extension
  76. *
  77. * @return string
  78. */
  79. public function getExtension()
  80. {
  81. return $this->_extension;
  82. }
  83. /**
  84. * Sets the extension
  85. *
  86. * @param string $extension extension
  87. *
  88. * @return void
  89. */
  90. public function setExtension($extension)
  91. {
  92. $this->_extension = $extension;
  93. }
  94. /**
  95. * Gets the options
  96. *
  97. * @return OptionsPropertyRootGroup
  98. */
  99. public function getOptions()
  100. {
  101. return $this->_options;
  102. }
  103. /**
  104. * Sets the options
  105. *
  106. * @param OptionsPropertyRootGroup $options options
  107. *
  108. * @return void
  109. */
  110. public function setOptions($options)
  111. {
  112. $this->_options = $options;
  113. }
  114. /**
  115. * Gets the options text
  116. *
  117. * @return string
  118. */
  119. public function getOptionsText()
  120. {
  121. return $this->_optionsText;
  122. }
  123. /**
  124. * Sets the options text
  125. *
  126. * @param string $optionsText optionsText
  127. *
  128. * @return void
  129. */
  130. public function setOptionsText($optionsText)
  131. {
  132. $this->_optionsText = $optionsText;
  133. }
  134. /**
  135. * Gets the MIME type
  136. *
  137. * @return string
  138. */
  139. public function getMimeType()
  140. {
  141. return $this->_mimeType;
  142. }
  143. /**
  144. * Sets the MIME type
  145. *
  146. * @param string $mimeType MIME type
  147. *
  148. * @return void
  149. */
  150. public function setMimeType($mimeType)
  151. {
  152. $this->_mimeType = $mimeType;
  153. }
  154. /**
  155. * Returns the property type ( either "options", or "plugin" ).
  156. *
  157. * @return string
  158. */
  159. public function getPropertyType()
  160. {
  161. return "plugin";
  162. }
  163. }