@@ -254,34 +254,34 @@ |
||
254 | 254 | { |
255 | 255 | switch ($key = strtolower($key)) { |
256 | 256 | |
257 | - case 'ajax': |
|
258 | - if (!isset($this->_isCache['ajax'])) { |
|
259 | - return $this->_isCache['ajax'] = $this->getService('request')->isXmlHttpRequest(); |
|
260 | - } |
|
261 | - |
|
262 | - return $this->_isCache['ajax']; |
|
263 | - |
|
264 | - case 'put': |
|
265 | - case 'delete': |
|
266 | - case 'post': |
|
267 | - case 'patch': |
|
268 | - if (!isset($this->_isCache['requestMethod'][$key])) { |
|
269 | - $this->_isCache['requestMethod'][$key] = $this->getService('request')->getMethod() === strtoupper($key); |
|
270 | - } |
|
271 | - |
|
272 | - return $this->_isCache['requestMethod'][$key]; |
|
273 | - |
|
274 | - case 'ssl': |
|
275 | - case 'https': |
|
276 | - case 'secure': |
|
277 | - if (!isset($this->_isCache['secure'])) { |
|
278 | - $this->_isCache['secure'] = $this->getService('request')->isSecure(); |
|
279 | - } |
|
280 | - |
|
281 | - return $this->_isCache['secure']; |
|
282 | - |
|
283 | - default: |
|
284 | - throw new \InvalidArgumentException("Invalid 'is' key supplied: {$key}"); |
|
257 | + case 'ajax': |
|
258 | + if (!isset($this->_isCache['ajax'])) { |
|
259 | + return $this->_isCache['ajax'] = $this->getService('request')->isXmlHttpRequest(); |
|
260 | + } |
|
261 | + |
|
262 | + return $this->_isCache['ajax']; |
|
263 | + |
|
264 | + case 'put': |
|
265 | + case 'delete': |
|
266 | + case 'post': |
|
267 | + case 'patch': |
|
268 | + if (!isset($this->_isCache['requestMethod'][$key])) { |
|
269 | + $this->_isCache['requestMethod'][$key] = $this->getService('request')->getMethod() === strtoupper($key); |
|
270 | + } |
|
271 | + |
|
272 | + return $this->_isCache['requestMethod'][$key]; |
|
273 | + |
|
274 | + case 'ssl': |
|
275 | + case 'https': |
|
276 | + case 'secure': |
|
277 | + if (!isset($this->_isCache['secure'])) { |
|
278 | + $this->_isCache['secure'] = $this->getService('request')->isSecure(); |
|
279 | + } |
|
280 | + |
|
281 | + return $this->_isCache['secure']; |
|
282 | + |
|
283 | + default: |
|
284 | + throw new \InvalidArgumentException("Invalid 'is' key supplied: {$key}"); |
|
285 | 285 | |
286 | 286 | } |
287 | 287 |
@@ -134,18 +134,18 @@ |
||
134 | 134 | { |
135 | 135 | switch ($type) { |
136 | 136 | |
137 | - case 'mongodb': |
|
138 | - throw new \InvalidArgumentException('Invalid activeQueryFactory type. MongoDB not yet implemented'); |
|
139 | - break; |
|
140 | - |
|
141 | - case 'couchdb': |
|
142 | - throw new \InvalidArgumentException('Invalid activeQueryFactory type. CouchDB not yet implemented'); |
|
143 | - break; |
|
144 | - |
|
145 | - case 'pdo': |
|
146 | - default: |
|
147 | - return new \PPI\DataSource\PDO\ActiveQuery($options); |
|
148 | - break; |
|
137 | + case 'mongodb': |
|
138 | + throw new \InvalidArgumentException('Invalid activeQueryFactory type. MongoDB not yet implemented'); |
|
139 | + break; |
|
140 | + |
|
141 | + case 'couchdb': |
|
142 | + throw new \InvalidArgumentException('Invalid activeQueryFactory type. CouchDB not yet implemented'); |
|
143 | + break; |
|
144 | + |
|
145 | + case 'pdo': |
|
146 | + default: |
|
147 | + return new \PPI\DataSource\PDO\ActiveQuery($options); |
|
148 | + break; |
|
149 | 149 | } |
150 | 150 | } |
151 | 151 |
@@ -263,15 +263,15 @@ |
||
263 | 263 | switch (true) { |
264 | 264 | |
265 | 265 | // If the controller is just returning HTML content then that becomes our body response. |
266 | - case is_string($result): |
|
267 | - case is_null($result): |
|
268 | - $this->_response = $controller->getServiceLocator()->get('response'); |
|
269 | - $this->_response->setContent($result); |
|
270 | - break; |
|
271 | - |
|
272 | - case $result instanceof Response: |
|
273 | - $this->_response = $result; |
|
274 | - break; |
|
266 | + case is_string($result): |
|
267 | + case is_null($result): |
|
268 | + $this->_response = $controller->getServiceLocator()->get('response'); |
|
269 | + $this->_response->setContent($result); |
|
270 | + break; |
|
271 | + |
|
272 | + case $result instanceof Response: |
|
273 | + $this->_response = $result; |
|
274 | + break; |
|
275 | 275 | |
276 | 276 | } |
277 | 277 |