ImportPluginProperties.class.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Properties class for the import 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. * @package PhpMyAdmin
  17. */
  18. class ImportPluginProperties extends PluginPropertyItem
  19. {
  20. /**
  21. * Text
  22. *
  23. * @var string
  24. */
  25. private $_text;
  26. /**
  27. * Extension
  28. *
  29. * @var string
  30. */
  31. private $_extension;
  32. /**
  33. * Options
  34. *
  35. * @var OptionsPropertyRootGroup
  36. */
  37. private $_options;
  38. /**
  39. * Options text
  40. *
  41. * @var string
  42. */
  43. private $_optionsText;
  44. /**
  45. * MIME Type
  46. *
  47. * @var string
  48. */
  49. private $_mimeType;
  50. /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
  51. /**
  52. * Returns the property item type of either an instance of
  53. * - OptionsPropertyOneItem ( f.e. "bool", "text", "radio", etc ) or
  54. * - OptionsPropertyGroup ( "root", "main" or "subgroup" )
  55. * - PluginPropertyItem ( "export", "import", "transformations" )
  56. *
  57. * @return string
  58. */
  59. public function getItemType()
  60. {
  61. return "import";
  62. }
  63. /**
  64. * Gets the text
  65. *
  66. * @return string
  67. */
  68. public function getText()
  69. {
  70. return $this->_text;
  71. }
  72. /**
  73. * Sets the text
  74. *
  75. * @param string $text text
  76. *
  77. * @return void
  78. */
  79. public function setText($text)
  80. {
  81. $this->_text = $text;
  82. }
  83. /**
  84. * Gets the extension
  85. *
  86. * @return string
  87. */
  88. public function getExtension()
  89. {
  90. return $this->_extension;
  91. }
  92. /**
  93. * Sets the extension
  94. *
  95. * @param string $extension extension
  96. *
  97. * @return void
  98. */
  99. public function setExtension($extension)
  100. {
  101. $this->_extension = $extension;
  102. }
  103. /**
  104. * Gets the options
  105. *
  106. * @return OptionsPropertyRootGroup
  107. */
  108. public function getOptions()
  109. {
  110. return $this->_options;
  111. }
  112. /**
  113. * Sets the options
  114. *
  115. * @param OptionsPropertyRootGroup $options options
  116. *
  117. * @return void
  118. */
  119. public function setOptions($options)
  120. {
  121. $this->_options = $options;
  122. }
  123. /**
  124. * Gets the options text
  125. *
  126. * @return string
  127. */
  128. public function getOptionsText()
  129. {
  130. return $this->_optionsText;
  131. }
  132. /**
  133. * Sets the options text
  134. *
  135. * @param string $optionsText options text
  136. *
  137. * @return void
  138. */
  139. public function setOptionsText($optionsText)
  140. {
  141. $this->_optionsText = $optionsText;
  142. }
  143. /**
  144. * Gets the MIME type
  145. *
  146. * @return string
  147. */
  148. public function getMimeType()
  149. {
  150. return $this->_mimeType;
  151. }
  152. /**
  153. * Sets the MIME type
  154. *
  155. * @param string $mimeType MIME type
  156. *
  157. * @return void
  158. */
  159. public function setMimeType($mimeType)
  160. {
  161. $this->_mimeType = $mimeType;
  162. }
  163. }
  164. ?>