OptionsPropertyOneItem.php 2.4 KB

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