PluginPropertyItem.php 3.0 KB

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