1 | <?php |
||
22 | class Factory |
||
23 | { |
||
24 | use \Jaxon\Utils\Traits\Config; |
||
25 | |||
26 | /** |
||
27 | * The prefix to prepend on each call |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $sPrefix; |
||
32 | |||
33 | /** |
||
34 | * Set the name of the class to call |
||
35 | * |
||
36 | * @param string|null $sClass The callable class |
||
37 | * |
||
38 | * @return Factory |
||
39 | */ |
||
40 | public function setClassName($sClass) |
||
55 | |||
56 | /** |
||
57 | * Set the callable object to call |
||
58 | * |
||
59 | * @param CallableObject $xCallable The callable object |
||
60 | * |
||
61 | * @return Factory |
||
62 | */ |
||
63 | public function setCallable(CallableObject $xCallable) |
||
69 | |||
70 | /** |
||
71 | * Return the javascript call to a Jaxon function or object method |
||
72 | * |
||
73 | * @param string $sFunction The function or method (without class) name |
||
74 | * @param ... $xParams The parameters of the function or method |
||
75 | * |
||
76 | * @return \Jaxon\Request\Request |
||
77 | */ |
||
78 | public function call($sFunction) |
||
98 | |||
99 | /** |
||
100 | * Return the javascript call to a generic function |
||
101 | * |
||
102 | * @param string $sFunction The function or method (with class) name |
||
103 | * @param ... $xParams The parameters of the function or method |
||
104 | * |
||
105 | * @return \Jaxon\Request\Request |
||
106 | */ |
||
107 | public function func($sFunction) |
||
119 | |||
120 | /** |
||
121 | * Make the pagination links for a registered Jaxon class method |
||
122 | * |
||
123 | * @param integer $nItemsTotal The total number of items |
||
124 | * @param integer $nItemsPerPage The number of items per page page |
||
125 | * @param integer $nCurrentPage The current page |
||
126 | * @param string $sMethod The name of function or a method prepended with its class name |
||
127 | * @param ... $xParams The parameters of the function or method |
||
128 | * |
||
129 | * @return string the pagination links |
||
130 | */ |
||
131 | public function paginate($nItemsTotal, $nItemsPerPage, $nCurrentPage, $sMethod) |
||
140 | |||
141 | /** |
||
142 | * Make a parameter of type Jaxon::FORM_VALUES |
||
143 | * |
||
144 | * @param string $sFormId The id of the HTML form |
||
145 | * |
||
146 | * @return Parameter |
||
147 | */ |
||
148 | public function form($sFormId) |
||
152 | |||
153 | /** |
||
154 | * Make a parameter of type Jaxon::INPUT_VALUE |
||
155 | * |
||
156 | * @param string $sInputId the id of the HTML input element |
||
157 | * |
||
158 | * @return Parameter |
||
159 | */ |
||
160 | public function input($sInputId) |
||
164 | |||
165 | /** |
||
166 | * Make a parameter of type Jaxon::CHECKED_VALUE |
||
167 | * |
||
168 | * @param string $sInputId the name of the HTML form element |
||
169 | * |
||
170 | * @return Parameter |
||
171 | */ |
||
172 | public function checked($sInputId) |
||
176 | |||
177 | /** |
||
178 | * Make a parameter of type Jaxon::CHECKED_VALUE |
||
179 | * |
||
180 | * @param string $sInputId the name of the HTML form element |
||
181 | * |
||
182 | * @return Parameter |
||
183 | */ |
||
184 | public function select($sInputId) |
||
188 | |||
189 | /** |
||
190 | * Make a parameter of type Jaxon::ELEMENT_INNERHTML |
||
191 | * |
||
192 | * @param string $sElementId the id of the HTML element |
||
193 | * |
||
194 | * @return Parameter |
||
195 | */ |
||
196 | public function html($sElementId) |
||
200 | |||
201 | /** |
||
202 | * Make a parameter of type Jaxon::QUOTED_VALUE |
||
203 | * |
||
204 | * @param string $sValue the value of the parameter |
||
205 | * |
||
206 | * @return Parameter |
||
207 | */ |
||
208 | public function string($sValue) |
||
212 | |||
213 | /** |
||
214 | * Make a parameter of type Jaxon::NUMERIC_VALUE |
||
215 | * |
||
216 | * @param numeric $nValue the value of the parameter |
||
217 | * |
||
218 | * @return Parameter |
||
219 | */ |
||
220 | public function numeric($nValue) |
||
224 | |||
225 | /** |
||
226 | * Make a parameter of type Jaxon::NUMERIC_VALUE |
||
227 | * |
||
228 | * @param numeric $nValue the value of the parameter |
||
229 | * |
||
230 | * @return Parameter |
||
231 | */ |
||
232 | public function int($nValue) |
||
236 | |||
237 | /** |
||
238 | * Make a parameter of type Jaxon::JS_VALUE |
||
239 | * |
||
240 | * @param string $sValue the javascript code of the parameter |
||
241 | * |
||
242 | * @return Parameter |
||
243 | */ |
||
244 | public function javascript($sValue) |
||
248 | |||
249 | /** |
||
250 | * Make a parameter of type Jaxon::JS_VALUE |
||
251 | * |
||
252 | * @param string $sValue the javascript code of the parameter |
||
253 | * |
||
254 | * @return Parameter |
||
255 | */ |
||
256 | public function js($sValue) |
||
260 | |||
261 | /** |
||
262 | * Make a parameter of type Jaxon::PAGE_NUMBER |
||
263 | * |
||
264 | * @return Parameter |
||
265 | */ |
||
266 | public function page() |
||
271 | } |
||
272 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.