1 | <?php |
||
23 | class DataTablesOptions { |
||
24 | |||
25 | /** |
||
26 | * Options. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | private $options; |
||
31 | |||
32 | /** |
||
33 | * Constructor. |
||
34 | */ |
||
35 | public function __construct() { |
||
38 | |||
39 | /** |
||
40 | * Ad an option. |
||
41 | * |
||
42 | * @param string $name The name. |
||
43 | * @param mixed $value The value. |
||
44 | * @return DataTablesOptions Returns this options. |
||
45 | * @throws StringArgumentException Throws a string argument exception if the argument is not a string. |
||
46 | */ |
||
47 | public function addOption($name, $value) { |
||
54 | |||
55 | /** |
||
56 | * Get an option. |
||
57 | * |
||
58 | * @param string $name The name. |
||
59 | * @return mixed Returns the option in case of success, null otherwise. |
||
60 | */ |
||
61 | public function getOption($name) { |
||
67 | |||
68 | /** |
||
69 | * Get the options. |
||
70 | * |
||
71 | * @return array Returns the options. |
||
72 | */ |
||
73 | public function getOptions() { |
||
76 | |||
77 | /** |
||
78 | * Determines if an option exists. |
||
79 | * |
||
80 | * @param string $name The name. |
||
81 | * @return bool Returns true in case of success, false otherwise. |
||
82 | */ |
||
83 | public function hasOption($name) { |
||
86 | |||
87 | /** |
||
88 | * Remove an option. |
||
89 | * |
||
90 | * @param string $name The name. |
||
91 | * @return DataTablesOptions Returns this option. |
||
92 | */ |
||
93 | public function removeOption($name) { |
||
99 | |||
100 | /** |
||
101 | * Set an option. |
||
102 | * |
||
103 | * @param string $name The name. |
||
104 | * @param mixed $value The value. |
||
105 | * @return DataTablesOptions Returns this options. |
||
106 | * @throws StringArgumentException Throws a string argument exception if the argument is not a string. |
||
107 | */ |
||
108 | public function setOption($name, $value) { |
||
113 | |||
114 | /** |
||
115 | * Set the options. |
||
116 | * |
||
117 | * @param array $options Thhe options. |
||
118 | * @return DataTablesOptions Returns this options. |
||
119 | */ |
||
120 | protected function setOptions(array $options) { |
||
124 | |||
125 | } |
||
126 |