1 | <?php |
||
13 | class Response |
||
14 | { |
||
15 | /** Theme object */ |
||
16 | protected $_theme = null; |
||
17 | /** Theme name */ |
||
18 | protected $_themeName; |
||
19 | /** Theme template */ |
||
20 | protected $_themeTemplate = 'default'; |
||
21 | /** Theme Ignore (if set to true output is rendered without theme) */ |
||
22 | protected $_themeIgnore = false; |
||
23 | /** Content */ |
||
24 | protected $_content = null; |
||
25 | /** Data */ |
||
26 | protected $_data = array(); |
||
27 | |||
28 | /** |
||
29 | * Constructor |
||
30 | * |
||
31 | * @param Theme $theme - Theme Object (Container) |
||
32 | */ |
||
33 | public function __construct($theme = null) |
||
37 | |||
38 | /** |
||
39 | * Set key value data |
||
40 | * |
||
41 | * @param mixed $key |
||
42 | * @param mixed $value |
||
43 | */ |
||
44 | public function setKeyValue($key, $value) |
||
48 | |||
49 | /** |
||
50 | * Get data value by key |
||
51 | * |
||
52 | * @param mixed $key |
||
53 | * @return mixed |
||
54 | */ |
||
55 | public function getKeyValue($key) |
||
59 | |||
60 | /** |
||
61 | * Add a pool of key/values segmented by type |
||
62 | * This is useful for js/css includes and other grouped data |
||
63 | */ |
||
64 | public function addTypedKeyValue($type, $key, $value) |
||
70 | |||
71 | /** |
||
72 | * Set theme |
||
73 | * |
||
74 | * @param Theme object $theme - Theme Object (Container) |
||
75 | */ |
||
76 | public function setTheme($theme) |
||
80 | |||
81 | /** |
||
82 | * Get theme |
||
83 | * |
||
84 | * @return Theme Object $theme |
||
85 | */ |
||
86 | public function getTheme() |
||
93 | |||
94 | /** |
||
95 | * Set Theme Name |
||
96 | * |
||
97 | * @param string $themeName |
||
98 | */ |
||
99 | public function setThemeName($themeName) |
||
103 | |||
104 | /** |
||
105 | * Get the theme name |
||
106 | * Name pecking order: response, theme, config |
||
107 | * |
||
108 | * @return string $name |
||
109 | */ |
||
110 | public function getThemeName() |
||
121 | |||
122 | /** |
||
123 | * Set Theme Template |
||
124 | * |
||
125 | * @param string $tamplate |
||
|
|||
126 | */ |
||
127 | public function setThemeTemplate($template) |
||
134 | |||
135 | /** |
||
136 | * Get the theme template |
||
137 | * |
||
138 | * @return string $_themeTemplate |
||
139 | */ |
||
140 | public function getThemeTemplate() |
||
144 | |||
145 | /** |
||
146 | * Set content |
||
147 | * |
||
148 | * @param Container $content - e.g. View or Layout Object |
||
149 | */ |
||
150 | public function setContent($content) |
||
154 | |||
155 | /** |
||
156 | * Get content |
||
157 | * |
||
158 | * @return string |
||
159 | */ |
||
160 | public function getContent() |
||
164 | |||
165 | /** |
||
166 | * Append some html content to the existing content |
||
167 | * |
||
168 | * @param string $content |
||
169 | * @todo check to see if content is a container, if so treat accordingly |
||
170 | */ |
||
171 | public function appendContent($content) |
||
175 | |||
176 | /** |
||
177 | * Render |
||
178 | * |
||
179 | * @return string |
||
180 | */ |
||
181 | public function render() |
||
194 | |||
195 | /** |
||
196 | * Render and send data to browser then end request |
||
197 | * |
||
198 | * @notice USE WITH CAUTION, |
||
199 | * This should be called at the end of processing the response |
||
200 | */ |
||
201 | public function send() |
||
205 | } |
||
206 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.