1 | <?php |
||
12 | class ApiResponse extends Response |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * _statusCode |
||
17 | * |
||
18 | * Unless explicitly set, default to a 200 status |
||
19 | * assuming everything went ok. |
||
20 | */ |
||
21 | protected $_statusCode = 200; |
||
22 | |||
23 | /** |
||
24 | * _errors |
||
25 | * |
||
26 | * |
||
27 | */ |
||
28 | protected $_errors = false; |
||
29 | |||
30 | /** |
||
31 | * Theme |
||
32 | */ |
||
33 | protected $_theme; |
||
34 | |||
35 | /** |
||
36 | * Content |
||
37 | */ |
||
38 | protected $_content = null; |
||
39 | |||
40 | |||
41 | |||
42 | /** |
||
43 | * setStatusCode |
||
44 | * |
||
45 | * Set, and send, the HTTP status code. |
||
46 | */ |
||
47 | public function setStatusCode($code = null) |
||
54 | |||
55 | public function setErrors($errors = null) |
||
65 | |||
66 | /** |
||
67 | * Ajax render function |
||
68 | * @todo add support for xml |
||
69 | * |
||
70 | * @return string |
||
71 | */ |
||
72 | public function render() |
||
82 | |||
83 | /** |
||
84 | * Render and send data to browser then end request |
||
85 | * |
||
86 | * @todo allow switching between json and xml |
||
87 | * @note This should only be called at the very end of processing the response |
||
88 | */ |
||
89 | public function send() |
||
96 | } |
||
97 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..