@@ -113,7 +113,7 @@ |
||
113 | 113 | $serviceManager->get('templating.helper.assets'), |
114 | 114 | new RouterHelper($serviceManager->get('router')), |
115 | 115 | new SessionHelper($serviceManager->get('session')) |
116 | - ) |
|
116 | + ) |
|
117 | 117 | ); |
118 | 118 | }); |
119 | 119 |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $knownEngineIds = array('php', 'smarty', 'twig', 'mustache'); |
67 | 67 | |
68 | 68 | // these are the engines selected by the user |
69 | - $engineIds = $serviceManager->getOption( 'templating.engines'); |
|
69 | + $engineIds = $serviceManager->getOption('templating.engines'); |
|
70 | 70 | |
71 | 71 | // filter templating engines |
72 | 72 | $engineIds = array_intersect($engineIds, $knownEngineIds); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | // Smarty Engine |
137 | 137 | $serviceManager->setFactory('templating.engine.smarty', function($serviceManager) { |
138 | - $cacheDir = $serviceManager->getOption('app.cache_dir').DIRECTORY_SEPARATOR.'smarty'; |
|
138 | + $cacheDir = $serviceManager->getOption('app.cache_dir') . DIRECTORY_SEPARATOR . 'smarty'; |
|
139 | 139 | $templateLocator = $serviceManager->get('templating.locator'); |
140 | 140 | |
141 | 141 | $smartyEngine = new SmartyEngine( |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $serviceManager->setFactory('templating', function($serviceManager) use ($engineIds) { |
173 | 173 | $delegatingEngine = new DelegatingEngine(); |
174 | 174 | foreach ($engineIds as $id) { |
175 | - $delegatingEngine->addEngine($serviceManager->get('templating.engine.'.$id)); |
|
175 | + $delegatingEngine->addEngine($serviceManager->get('templating.engine.' . $id)); |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | return $delegatingEngine; |
@@ -40,9 +40,9 @@ |
||
40 | 40 | $trace = $e->getTrace(); |
41 | 41 | |
42 | 42 | $error = array( |
43 | - 'file' => $e->getFile(), |
|
44 | - 'line' => $e->getLine(), |
|
45 | - 'message' => $e->getMessage() |
|
43 | + 'file' => $e->getFile(), |
|
44 | + 'line' => $e->getLine(), |
|
45 | + 'message' => $e->getMessage() |
|
46 | 46 | ); |
47 | 47 | |
48 | 48 | try { |
@@ -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 |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * |
108 | 108 | * @var \PPI\Module\ServiceManager\ServiceManager |
109 | 109 | */ |
110 | - protected $serviceManager; |
|
110 | + protected $serviceManager; |
|
111 | 111 | |
112 | 112 | /** |
113 | 113 | * The constructor. |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $dsConnections = $this->options->get('datasource.connections'); |
207 | 207 | |
208 | 208 | if ($this->options['useDataSource'] === true && $dsConnections !== null) { |
209 | - $this->serviceManager->set('datasource', new \PPI\DataSource\DataSource($dsConnections)); |
|
209 | + $this->serviceManager->set('datasource', new \PPI\DataSource\DataSource($dsConnections)); |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | // Fluent Interface |
@@ -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 |
@@ -322,7 +322,7 @@ |
||
322 | 322 | $routeUri = $this->_router->generate($this->options['404RouteName']); |
323 | 323 | |
324 | 324 | // We need to strip /myapp/public/404 down to /404, so our matchRoute() to work. |
325 | - if (!empty($baseUrl) && ($pos = strpos($routeUri, $baseUrl)) !== false ) { |
|
325 | + if (!empty($baseUrl) && ($pos = strpos($routeUri, $baseUrl)) !== false) { |
|
326 | 326 | $routeUri = substr_replace($routeUri, '', $pos, strlen($baseUrl)); |
327 | 327 | } |
328 | 328 |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the PPI Framework. |
|
4 | - * |
|
5 | - * @copyright Copyright (c) 2012 Paul Dragoonis <[email protected]> |
|
6 | - * @license http://opensource.org/licenses/mit-license.php MIT |
|
7 | - * @link http://www.ppi.io |
|
8 | - */ |
|
3 | + * This file is part of the PPI Framework. |
|
4 | + * |
|
5 | + * @copyright Copyright (c) 2012 Paul Dragoonis <[email protected]> |
|
6 | + * @license http://opensource.org/licenses/mit-license.php MIT |
|
7 | + * @link http://www.ppi.io |
|
8 | + */ |
|
9 | 9 | namespace PPI\ServiceManager; |
10 | 10 | |
11 | 11 | use PPI\ServiceManager\Options\OptionsInterface, |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the PPI Framework. |
|
4 | - * |
|
5 | - * @copyright Copyright (c) 2011-2013 Paul Dragoonis <[email protected]> |
|
6 | - * @license http://opensource.org/licenses/mit-license.php MIT |
|
7 | - * @link http://www.ppi.io |
|
8 | - */ |
|
3 | + * This file is part of the PPI Framework. |
|
4 | + * |
|
5 | + * @copyright Copyright (c) 2011-2013 Paul Dragoonis <[email protected]> |
|
6 | + * @license http://opensource.org/licenses/mit-license.php MIT |
|
7 | + * @link http://www.ppi.io |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | namespace PPI\Http; |
11 | 11 |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the PPI Framework. |
|
4 | - * |
|
5 | - * @copyright Copyright (c) 2011-2013 Paul Dragoonis <[email protected]> |
|
6 | - * @license http://opensource.org/licenses/mit-license.php MIT |
|
7 | - * @link http://www.ppi.io |
|
8 | - */ |
|
3 | + * This file is part of the PPI Framework. |
|
4 | + * |
|
5 | + * @copyright Copyright (c) 2011-2013 Paul Dragoonis <[email protected]> |
|
6 | + * @license http://opensource.org/licenses/mit-license.php MIT |
|
7 | + * @link http://www.ppi.io |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | namespace PPI\Http; |
11 | 11 |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the PPI Framework. |
|
4 | - * |
|
5 | - * @copyright Copyright (c) 2011-2013 Paul Dragoonis <[email protected]> |
|
6 | - * @license http://opensource.org/licenses/mit-license.php MIT |
|
7 | - * @link http://www.ppi.io |
|
8 | - */ |
|
3 | + * This file is part of the PPI Framework. |
|
4 | + * |
|
5 | + * @copyright Copyright (c) 2011-2013 Paul Dragoonis <[email protected]> |
|
6 | + * @license http://opensource.org/licenses/mit-license.php MIT |
|
7 | + * @link http://www.ppi.io |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | namespace PPI\Http; |
11 | 11 |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of the PPI Framework. |
|
4 | - * |
|
5 | - * @copyright Copyright (c) 2012 Paul Dragoonis <[email protected]> |
|
6 | - * @license http://opensource.org/licenses/mit-license.php MIT |
|
7 | - * @link http://www.ppi.io |
|
8 | - */ |
|
3 | + * This file is part of the PPI Framework. |
|
4 | + * |
|
5 | + * @copyright Copyright (c) 2012 Paul Dragoonis <[email protected]> |
|
6 | + * @license http://opensource.org/licenses/mit-license.php MIT |
|
7 | + * @link http://www.ppi.io |
|
8 | + */ |
|
9 | 9 | namespace PPI\Exception; |
10 | 10 | |
11 | 11 | /** |