OptionsPropertyOneItem.class.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Superclass for the single Property Item classes.
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. if (! defined('PHPMYADMIN')) {
  9. exit;
  10. }
  11. /* This class extends the OptionsPropertyItem class */
  12. require_once 'OptionsPropertyItem.class.php';
  13. /**
  14. * Parents only single property items (not groups).
  15. * Defines possible options and getters and setters for them.
  16. *
  17. * @package PhpMyAdmin
  18. */
  19. abstract class OptionsPropertyOneItem extends OptionsPropertyItem
  20. {
  21. /**
  22. * Whether to force or not
  23. *
  24. * @var bool
  25. */
  26. private $_force;
  27. /**
  28. * Values
  29. *
  30. * @var array
  31. */
  32. private $_values;
  33. /**
  34. * Doc
  35. *
  36. * @var string
  37. */
  38. private $_doc;
  39. /**
  40. * Length
  41. *
  42. * @var int
  43. */
  44. private $_len;
  45. /**
  46. * Size
  47. *
  48. * @var int
  49. */
  50. private $_size;
  51. /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
  52. /**
  53. * Gets the force parameter
  54. *
  55. * @return string
  56. */
  57. public function getForce()
  58. {
  59. return $this->_force;
  60. }
  61. /**
  62. * Sets the force parameter
  63. *
  64. * @param bool $force force parameter
  65. *
  66. * @return void
  67. */
  68. public function setForce($force)
  69. {
  70. $this->_force = $force;
  71. }
  72. /**
  73. * Gets the values
  74. *
  75. * @return string
  76. */
  77. public function getValues()
  78. {
  79. return $this->_values;
  80. }
  81. /**
  82. * Sets the values
  83. *
  84. * @param array $values values
  85. *
  86. * @return void
  87. */
  88. public function setValues($values)
  89. {
  90. $this->_values = $values;
  91. }
  92. /**
  93. * Gets the type of the newline character
  94. *
  95. * @return string
  96. */
  97. public function getDoc()
  98. {
  99. return $this->_doc;
  100. }
  101. /**
  102. * Sets the doc
  103. *
  104. * @param string $doc doc
  105. *
  106. * @return void
  107. */
  108. public function setDoc($doc)
  109. {
  110. $this->_doc = $doc;
  111. }
  112. /**
  113. * Gets the length
  114. *
  115. * @return int
  116. */
  117. public function getLen()
  118. {
  119. return $this->_len;
  120. }
  121. /**
  122. * Sets the length
  123. *
  124. * @param int $len length
  125. *
  126. * @return void
  127. */
  128. public function setLen($len)
  129. {
  130. $this->_len = $len;
  131. }
  132. /**
  133. * Gets the size
  134. *
  135. * @return int
  136. */
  137. public function getSize()
  138. {
  139. return $this->_size;
  140. }
  141. /**
  142. * Sets the size
  143. *
  144. * @param int $size size
  145. *
  146. * @return void
  147. */
  148. public function setSize($size)
  149. {
  150. $this->_size = $size;
  151. }
  152. }
  153. ?>