OptionsPropertyOneItem.php 2.5 KB

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