OptionsPropertyOneItem.php 2.5 KB

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