ExportPluginProperties.class.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Properties class for the export plug-in
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. if (! defined('PHPMYADMIN')) {
  9. exit;
  10. }
  11. /* This class extends the PluginPropertyItem class */
  12. require_once 'PluginPropertyItem.class.php';
  13. /**
  14. * Defines possible options and getters and setters for them.
  15. *
  16. * @todo modify descriptions if needed, when the plug-in properties are integrated
  17. * @package PhpMyAdmin
  18. */
  19. class ExportPluginProperties extends PluginPropertyItem
  20. {
  21. /**
  22. * Text
  23. *
  24. * @var string
  25. */
  26. private $_text;
  27. /**
  28. * Extension
  29. *
  30. * @var string
  31. */
  32. private $_extension;
  33. /**
  34. * Options
  35. *
  36. * @var OptionsPropertyRootGroup
  37. */
  38. private $_options;
  39. /**
  40. * Options text
  41. *
  42. * @var string
  43. */
  44. private $_optionsText;
  45. /**
  46. * MIME Type
  47. *
  48. * @var string
  49. */
  50. private $_mimeType;
  51. /**
  52. * Whether to force or not
  53. *
  54. * @var bool
  55. */
  56. private $_forceFile;
  57. /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
  58. /**
  59. * Returns the property item type of either an instance of
  60. * - OptionsPropertyOneItem ( f.e. "bool", "text", "radio", etc ) or
  61. * - OptionsPropertyGroup ( "root", "main" or "subgroup" )
  62. * - PluginPropertyItem ( "export", "import", "transformations" )
  63. *
  64. * @return string
  65. */
  66. public function getItemType()
  67. {
  68. return "export";
  69. }
  70. /**
  71. * Gets the text
  72. *
  73. * @return string
  74. */
  75. public function getText()
  76. {
  77. return $this->_text;
  78. }
  79. /**
  80. * Sets the text
  81. *
  82. * @param string $text text
  83. *
  84. * @return void
  85. */
  86. public function setText($text)
  87. {
  88. $this->_text = $text;
  89. }
  90. /**
  91. * Gets the extension
  92. *
  93. * @return string
  94. */
  95. public function getExtension()
  96. {
  97. return $this->_extension;
  98. }
  99. /**
  100. * Sets the extension
  101. *
  102. * @param string $extension extension
  103. *
  104. * @return void
  105. */
  106. public function setExtension($extension)
  107. {
  108. $this->_extension = $extension;
  109. }
  110. /**
  111. * Gets the options
  112. *
  113. * @return OptionsPropertyRootGroup
  114. */
  115. public function getOptions()
  116. {
  117. return $this->_options;
  118. }
  119. /**
  120. * Sets the options
  121. *
  122. * @param OptionsPropertyRootGroup $options options
  123. *
  124. * @return void
  125. */
  126. public function setOptions($options)
  127. {
  128. $this->_options = $options;
  129. }
  130. /**
  131. * Gets the options text
  132. *
  133. * @return string
  134. */
  135. public function getOptionsText()
  136. {
  137. return $this->_optionsText;
  138. }
  139. /**
  140. * Sets the options text
  141. *
  142. * @param string $optionsText optionsText
  143. *
  144. * @return void
  145. */
  146. public function setOptionsText($optionsText)
  147. {
  148. $this->_optionsText = $optionsText;
  149. }
  150. /**
  151. * Gets the MIME type
  152. *
  153. * @return string
  154. */
  155. public function getMimeType()
  156. {
  157. return $this->_mimeType;
  158. }
  159. /**
  160. * Sets the MIME type
  161. *
  162. * @param string $mimeType MIME type
  163. *
  164. * @return void
  165. */
  166. public function setMimeType($mimeType)
  167. {
  168. $this->_mimeType = $mimeType;
  169. }
  170. /**
  171. * Gets the force file parameter
  172. *
  173. * @return bool
  174. */
  175. public function getForceFile()
  176. {
  177. return $this->_forceFile;
  178. }
  179. /**
  180. * Sets the force file parameter
  181. *
  182. * @param bool $forceFile the force file parameter
  183. *
  184. * @return void
  185. */
  186. public function setForceFile($forceFile)
  187. {
  188. $this->_forceFile = $forceFile;
  189. }
  190. }
  191. ?>