@@ -16,9 +16,9 @@ |
||
16 | 16 | |
17 | 17 | $run = new Whoops\Run; |
18 | 18 | if (PHP_SAPI === 'cli') |
19 | - $handler = new PlainTextHandler; |
|
19 | + $handler = new PlainTextHandler; |
|
20 | 20 | else |
21 | - $handler = new PrettyPageHandler; |
|
21 | + $handler = new PrettyPageHandler; |
|
22 | 22 | |
23 | 23 | $run->pushHandler($handler); |
24 | 24 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | use Whoops\Handler\PrettyPageHandler; |
15 | 15 | use Whoops\Handler\PlainTextHandler; |
16 | 16 | |
17 | -$run = new Whoops\Run; |
|
17 | +$run = new Whoops\Run; |
|
18 | 18 | if (PHP_SAPI === 'cli') |
19 | 19 | $handler = new PlainTextHandler; |
20 | 20 | else |
@@ -15,10 +15,11 @@ |
||
15 | 15 | use Whoops\Handler\PlainTextHandler; |
16 | 16 | |
17 | 17 | $run = new Whoops\Run; |
18 | -if (PHP_SAPI === 'cli') |
|
18 | +if (PHP_SAPI === 'cli') { |
|
19 | 19 | $handler = new PlainTextHandler; |
20 | -else |
|
20 | +} else { |
|
21 | 21 | $handler = new PrettyPageHandler; |
22 | +} |
|
22 | 23 | |
23 | 24 | $run->pushHandler($handler); |
24 | 25 |
@@ -11,9 +11,9 @@ |
||
11 | 11 | "/:module/:controller/:action/:params", |
12 | 12 | array( |
13 | 13 | "module" => 1, |
14 | - 'controller' => 2, |
|
15 | - 'action' => 3, |
|
16 | - 'params' => 4, |
|
14 | + 'controller' => 2, |
|
15 | + 'action' => 3, |
|
16 | + 'params' => 4, |
|
17 | 17 | ) |
18 | 18 | ); |
19 | 19 |
@@ -11,6 +11,6 @@ |
||
11 | 11 | { |
12 | 12 | public function mainAction($params) |
13 | 13 | { |
14 | - var_dump($params); |
|
14 | + var_dump($params); |
|
15 | 15 | } |
16 | 16 | } |
17 | 17 | \ No newline at end of file |
@@ -5,10 +5,10 @@ discard block |
||
5 | 5 | } |
6 | 6 | |
7 | 7 | function _if( $path, $name ) { |
8 | - $filePath = $path.'/'.(ENVIROMENT == '' ? '' : ENVIROMENT.'/').$name; |
|
9 | - if ( !is_file($filePath) ) |
|
10 | - $filePath = $path.'/'.$name; |
|
11 | - return $filePath; |
|
8 | + $filePath = $path.'/'.(ENVIROMENT == '' ? '' : ENVIROMENT.'/').$name; |
|
9 | + if ( !is_file($filePath) ) |
|
10 | + $filePath = $path.'/'.$name; |
|
11 | + return $filePath; |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | /* |
@@ -48,32 +48,32 @@ discard block |
||
48 | 48 | |
49 | 49 | $configurationName = null; |
50 | 50 | if (PHP_SAPI === 'cli') { |
51 | - if ( isset( $_SERVER['argv'][1] ) AND strpos($argv[1], "@") !== FALSE ) { |
|
52 | - $arguments = explode("@", $argv[1]); |
|
53 | - $configurationName = $arguments[0]; |
|
54 | - } |
|
51 | + if ( isset( $_SERVER['argv'][1] ) AND strpos($argv[1], "@") !== FALSE ) { |
|
52 | + $arguments = explode("@", $argv[1]); |
|
53 | + $configurationName = $arguments[0]; |
|
54 | + } |
|
55 | 55 | } else { |
56 | - if ( isset( $_SERVER['SERVER_NAME'] ) ) { |
|
57 | - $configurationName = $_SERVER['SERVER_NAME']; |
|
58 | - } |
|
56 | + if ( isset( $_SERVER['SERVER_NAME'] ) ) { |
|
57 | + $configurationName = $_SERVER['SERVER_NAME']; |
|
58 | + } |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | if ( !isset($solutionRouting->routing->$configurationName->name) ) { |
62 | - if ( isset( $solutionRouting->routing->default->name ) ) { |
|
63 | - $applicationName = $solutionRouting->routing->default->name; |
|
64 | - $enviromentName = ""; |
|
65 | - if ( isset($solutionRouting->routing->default->enviroment) ) { |
|
66 | - $enviromentName = $solutionRouting->routing->default->enviroment; |
|
67 | - } |
|
68 | - } else { |
|
69 | - _d("Solution routing configuration is failed. Please check your application route configurations"); |
|
70 | - } |
|
62 | + if ( isset( $solutionRouting->routing->default->name ) ) { |
|
63 | + $applicationName = $solutionRouting->routing->default->name; |
|
64 | + $enviromentName = ""; |
|
65 | + if ( isset($solutionRouting->routing->default->enviroment) ) { |
|
66 | + $enviromentName = $solutionRouting->routing->default->enviroment; |
|
67 | + } |
|
68 | + } else { |
|
69 | + _d("Solution routing configuration is failed. Please check your application route configurations"); |
|
70 | + } |
|
71 | 71 | } else { |
72 | - $applicationName = $solutionRouting->routing->$configurationName->name; |
|
73 | - $enviromentName = ""; |
|
74 | - if ( isset($solutionRouting->routing->$configurationName->enviroment) ) { |
|
75 | - $enviromentName = $solutionRouting->routing->$configurationName->enviroment; |
|
76 | - } |
|
72 | + $applicationName = $solutionRouting->routing->$configurationName->name; |
|
73 | + $enviromentName = ""; |
|
74 | + if ( isset($solutionRouting->routing->$configurationName->enviroment) ) { |
|
75 | + $enviromentName = $solutionRouting->routing->$configurationName->enviroment; |
|
76 | + } |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | define("ENVIROMENT", $enviromentName); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | define("APPLICATION_PATH", $pathConfigs->solution_path.APPLICATION_NAME."/" ); |
82 | 82 | |
83 | 83 | if ( !is_dir( APPLICATION_PATH ) ) |
84 | - _d("There is no application called \"".APPLICATION_NAME."\" in your apps folder."); |
|
84 | + _d("There is no application called \"".APPLICATION_NAME."\" in your apps folder."); |
|
85 | 85 | |
86 | 86 | /* |
87 | 87 | |-------------------------------------------------------------------------- |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | */ |
96 | 96 | |
97 | 97 | if ( !is_file( VENDOR_PATH.'autoload.php' ) ) { |
98 | - _d("There is no autoload.php in your \"".VENDOR_PATH."\". Please update your vendor folder."); |
|
98 | + _d("There is no autoload.php in your \"".VENDOR_PATH."\". Please update your vendor folder."); |
|
99 | 99 | } else { |
100 | - require VENDOR_PATH.'autoload.php'; |
|
100 | + require VENDOR_PATH.'autoload.php'; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | /* |
@@ -4,9 +4,9 @@ discard block |
||
4 | 4 | _d('Phalcon extension isn\'t installed. Please follow these instructions to install it: http://docs.phalconphp.com/en/latest/reference/install.html'); |
5 | 5 | } |
6 | 6 | |
7 | -function _if( $path, $name ) { |
|
7 | +function _if($path, $name) { |
|
8 | 8 | $filePath = $path.'/'.(ENVIROMENT == '' ? '' : ENVIROMENT.'/').$name; |
9 | - if ( !is_file($filePath) ) |
|
9 | + if (!is_file($filePath)) |
|
10 | 10 | $filePath = $path.'/'.$name; |
11 | 11 | return $filePath; |
12 | 12 | } |
@@ -21,17 +21,17 @@ discard block |
||
21 | 21 | | |
22 | 22 | */ |
23 | 23 | |
24 | -define("ROOT_PATH", realpath( __DIR__."/../") ); |
|
24 | +define("ROOT_PATH", realpath(__DIR__."/../")); |
|
25 | 25 | |
26 | 26 | $pathConfigs = new \Phalcon\Config( |
27 | 27 | include_once __DIR__."/paths.php" |
28 | 28 | ); |
29 | 29 | |
30 | -define("SOLUTION_PATH", $pathConfigs->solution_path ); |
|
31 | -define("STORAGE_PATH", $pathConfigs->storage_path ); |
|
32 | -define("PUBLIC_PATH", $pathConfigs->public_path ); |
|
33 | -define("VENDOR_PATH", $pathConfigs->vendor_path ); |
|
34 | -define("GLOBAL_CONFIG_PATH", $pathConfigs->global_config_path ); |
|
30 | +define("SOLUTION_PATH", $pathConfigs->solution_path); |
|
31 | +define("STORAGE_PATH", $pathConfigs->storage_path); |
|
32 | +define("PUBLIC_PATH", $pathConfigs->public_path); |
|
33 | +define("VENDOR_PATH", $pathConfigs->vendor_path); |
|
34 | +define("GLOBAL_CONFIG_PATH", $pathConfigs->global_config_path); |
|
35 | 35 | |
36 | 36 | /* |
37 | 37 | |-------------------------------------------------------------------------- |
@@ -48,21 +48,21 @@ discard block |
||
48 | 48 | |
49 | 49 | $configurationName = null; |
50 | 50 | if (PHP_SAPI === 'cli') { |
51 | - if ( isset( $_SERVER['argv'][1] ) AND strpos($argv[1], "@") !== FALSE ) { |
|
51 | + if (isset($_SERVER['argv'][1]) AND strpos($argv[1], "@") !== FALSE) { |
|
52 | 52 | $arguments = explode("@", $argv[1]); |
53 | 53 | $configurationName = $arguments[0]; |
54 | 54 | } |
55 | 55 | } else { |
56 | - if ( isset( $_SERVER['SERVER_NAME'] ) ) { |
|
56 | + if (isset($_SERVER['SERVER_NAME'])) { |
|
57 | 57 | $configurationName = $_SERVER['SERVER_NAME']; |
58 | 58 | } |
59 | 59 | } |
60 | 60 | |
61 | -if ( !isset($solutionRouting->routing->$configurationName->name) ) { |
|
62 | - if ( isset( $solutionRouting->routing->default->name ) ) { |
|
61 | +if (!isset($solutionRouting->routing->$configurationName->name)) { |
|
62 | + if (isset($solutionRouting->routing->default->name)) { |
|
63 | 63 | $applicationName = $solutionRouting->routing->default->name; |
64 | 64 | $enviromentName = ""; |
65 | - if ( isset($solutionRouting->routing->default->enviroment) ) { |
|
65 | + if (isset($solutionRouting->routing->default->enviroment)) { |
|
66 | 66 | $enviromentName = $solutionRouting->routing->default->enviroment; |
67 | 67 | } |
68 | 68 | } else { |
@@ -71,16 +71,16 @@ discard block |
||
71 | 71 | } else { |
72 | 72 | $applicationName = $solutionRouting->routing->$configurationName->name; |
73 | 73 | $enviromentName = ""; |
74 | - if ( isset($solutionRouting->routing->$configurationName->enviroment) ) { |
|
74 | + if (isset($solutionRouting->routing->$configurationName->enviroment)) { |
|
75 | 75 | $enviromentName = $solutionRouting->routing->$configurationName->enviroment; |
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
79 | 79 | define("ENVIROMENT", $enviromentName); |
80 | 80 | define("APPLICATION_NAME", $applicationName); |
81 | -define("APPLICATION_PATH", $pathConfigs->solution_path.APPLICATION_NAME."/" ); |
|
81 | +define("APPLICATION_PATH", $pathConfigs->solution_path.APPLICATION_NAME."/"); |
|
82 | 82 | |
83 | -if ( !is_dir( APPLICATION_PATH ) ) |
|
83 | +if (!is_dir(APPLICATION_PATH)) |
|
84 | 84 | _d("There is no application called \"".APPLICATION_NAME."\" in your apps folder."); |
85 | 85 | |
86 | 86 | /* |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | | loading of any our classes "manually". Feels great to relax. |
95 | 95 | */ |
96 | 96 | |
97 | -if ( !is_file( VENDOR_PATH.'autoload.php' ) ) { |
|
97 | +if (!is_file(VENDOR_PATH.'autoload.php')) { |
|
98 | 98 | _d("There is no autoload.php in your \"".VENDOR_PATH."\". Please update your vendor folder."); |
99 | 99 | } else { |
100 | 100 | require VENDOR_PATH.'autoload.php'; |
@@ -6,8 +6,9 @@ discard block |
||
6 | 6 | |
7 | 7 | function _if( $path, $name ) { |
8 | 8 | $filePath = $path.'/'.(ENVIROMENT == '' ? '' : ENVIROMENT.'/').$name; |
9 | - if ( !is_file($filePath) ) |
|
10 | - $filePath = $path.'/'.$name; |
|
9 | + if ( !is_file($filePath) ) { |
|
10 | + $filePath = $path.'/'.$name; |
|
11 | + } |
|
11 | 12 | return $filePath; |
12 | 13 | } |
13 | 14 | |
@@ -80,8 +81,9 @@ discard block |
||
80 | 81 | define("APPLICATION_NAME", $applicationName); |
81 | 82 | define("APPLICATION_PATH", $pathConfigs->solution_path.APPLICATION_NAME."/" ); |
82 | 83 | |
83 | -if ( !is_dir( APPLICATION_PATH ) ) |
|
84 | +if ( !is_dir( APPLICATION_PATH ) ) { |
|
84 | 85 | _d("There is no application called \"".APPLICATION_NAME."\" in your apps folder."); |
86 | +} |
|
85 | 87 | |
86 | 88 | /* |
87 | 89 | |-------------------------------------------------------------------------- |
@@ -11,9 +11,9 @@ |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | if (PHP_SAPI === 'cli') { |
14 | - $di = new \Phalcon\DI\FactoryDefault\CLI(); |
|
14 | + $di = new \Phalcon\DI\FactoryDefault\CLI(); |
|
15 | 15 | } else { |
16 | - $di = new \Phalcon\DI\FactoryDefault(); |
|
16 | + $di = new \Phalcon\DI\FactoryDefault(); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | /* |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | | |
43 | 43 | */ |
44 | 44 | |
45 | -$di->set('error', function () { |
|
45 | +$di->set('error', function() { |
|
46 | 46 | return include_once APPLICATION_PATH."configs/error.php"; |
47 | 47 | }); |
48 | 48 | |
@@ -91,10 +91,10 @@ discard block |
||
91 | 91 | include_once _if(APPLICATION_PATH."configs", "database.php") |
92 | 92 | ); |
93 | 93 | |
94 | -foreach ($dbConfig->databases as $name => $dbConfig ) { |
|
94 | +foreach ($dbConfig->databases as $name => $dbConfig) { |
|
95 | 95 | $di->set($name, function() use ($dbConfig, $di){ |
96 | 96 | $className = $dbConfig["type"]; |
97 | - $database = new $className($dbConfig["config"]->toArray()); |
|
97 | + $database = new $className($dbConfig["config"]->toArray()); |
|
98 | 98 | $database->connect(); |
99 | 99 | return $database; |
100 | 100 | }); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | | |
155 | 155 | */ |
156 | 156 | |
157 | -$di->set('response', function(){ |
|
157 | +$di->set('response', function() { |
|
158 | 158 | return new \Phalcon\Http\Response(); |
159 | 159 | }); |
160 | 160 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | | |
171 | 171 | */ |
172 | 172 | |
173 | -$di->set('assets', function () { |
|
173 | +$di->set('assets', function() { |
|
174 | 174 | $assetManager = new \Phalcon\Assets\Manager(); |
175 | 175 | return $assetManager; |
176 | 176 | }, true); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | |
189 | 189 | if (PHP_SAPI !== 'cli') |
190 | 190 | { |
191 | - $di->set('url', function () { |
|
191 | + $di->set('url', function() { |
|
192 | 192 | global $di; |
193 | 193 | $appConfig = $di->get('config'); |
194 | 194 | $url = new \Phalcon\Mvc\Url(); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | | |
210 | 210 | */ |
211 | 211 | |
212 | -$di->set('crypt', function (){ |
|
212 | +$di->set('crypt', function() { |
|
213 | 213 | global $di; |
214 | 214 | $appConfig = $di->get('config'); |
215 | 215 | $crypt = new \Phalcon\Crypt(); |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | if (PHP_SAPI !== 'cli') |
287 | 287 | { |
288 | 288 | |
289 | - $di->set('router', function () { |
|
289 | + $di->set('router', function() { |
|
290 | 290 | global $di; |
291 | 291 | $appConfig = $di->get('config'); |
292 | 292 | $router = new \Phalcon\Mvc\Router\Annotations(false); |
@@ -192,8 +192,9 @@ |
||
192 | 192 | global $di; |
193 | 193 | $appConfig = $di->get('config'); |
194 | 194 | $url = new \Phalcon\Mvc\Url(); |
195 | - if (!is_null($appConfig->base_url)) |
|
196 | - $url->setBaseUri($appConfig->base_url); |
|
195 | + if (!is_null($appConfig->base_url)) { |
|
196 | + $url->setBaseUri($appConfig->base_url); |
|
197 | + } |
|
197 | 198 | return $url; |
198 | 199 | }, true); |
199 | 200 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | | |
13 | 13 | */ |
14 | 14 | |
15 | - 'solution_path' => ROOT_PATH."/apps/", |
|
15 | + 'solution_path' => ROOT_PATH."/apps/", |
|
16 | 16 | |
17 | 17 | /* |
18 | 18 | |-------------------------------------------------------------------------- |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | | |
27 | 27 | */ |
28 | 28 | |
29 | - 'storage_path' => ROOT_PATH."/storage/", |
|
29 | + 'storage_path' => ROOT_PATH."/storage/", |
|
30 | 30 | |
31 | 31 | /* |
32 | 32 | |-------------------------------------------------------------------------- |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | | |
39 | 39 | */ |
40 | 40 | |
41 | - 'public_path' => ROOT_PATH."/public/", |
|
41 | + 'public_path' => ROOT_PATH."/public/", |
|
42 | 42 | |
43 | 43 | /* |
44 | 44 | |-------------------------------------------------------------------------- |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | | |
51 | 51 | */ |
52 | 52 | |
53 | - 'vendor_path' => ROOT_PATH."/vendor/", |
|
53 | + 'vendor_path' => ROOT_PATH."/vendor/", |
|
54 | 54 | |
55 | 55 | /* |
56 | 56 | |-------------------------------------------------------------------------- |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | $arguments['task'] = $appConfig->default_task; |
52 | 52 | $arguments['action'] = $appConfig->default_action; |
53 | 53 | |
54 | - if ( isset( $_SERVER['argv'][1] ) AND strpos($argv[1], "@") !== FALSE ) { |
|
54 | + if (isset($_SERVER['argv'][1]) AND strpos($argv[1], "@") !== FALSE) { |
|
55 | 55 | $itemNumber = 0; |
56 | 56 | $allArguments = explode("@", $argv[1]); |
57 | - if ( count($allArguments) === 2 ) |
|
57 | + if (count($allArguments) === 2) |
|
58 | 58 | { |
59 | 59 | $itemNumber = 1; |
60 | 60 | } |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | |
68 | 68 | $arguments['params'] = array(); |
69 | 69 | |
70 | - foreach($_SERVER['argv'] as $k => $arg) { |
|
71 | - if($k >= 2) { |
|
70 | + foreach ($_SERVER['argv'] as $k => $arg) { |
|
71 | + if ($k >= 2) { |
|
72 | 72 | $arguments['params'][] = $arg; |
73 | 73 | } |
74 | 74 | } |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | $output = $application->handle()->getContent(); |
84 | 84 | |
85 | 85 | // HTML Minification |
86 | - if ( $appConfig->html_minify ) { |
|
87 | - ob_start( function() use ($output) { |
|
88 | - $search = array( '/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s' ); |
|
89 | - $replace = array( '>', '<', '\\1' ); |
|
86 | + if ($appConfig->html_minify) { |
|
87 | + ob_start(function() use ($output) { |
|
88 | + $search = array('/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s'); |
|
89 | + $replace = array('>', '<', '\\1'); |
|
90 | 90 | $buffer = preg_replace($search, $replace, $output); |
91 | 91 | return $buffer; |
92 | 92 | }); |
@@ -75,8 +75,7 @@ |
||
75 | 75 | |
76 | 76 | // handle incoming arguments |
77 | 77 | $application->handle($arguments); |
78 | -} |
|
79 | -else |
|
78 | +} else |
|
80 | 79 | { |
81 | 80 | $debugWidget = new \Phalcon\Debug\DebugWidget($di); |
82 | 81 | //Handle the request |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | |
27 | 27 | $loader->registerNamespaces( |
28 | 28 | array( |
29 | - 'Modules\Common\Controllers' => __DIR__ . '/controllers/', |
|
30 | - 'Modules\Common\Models' => __DIR__ . '/models/', |
|
29 | + 'Modules\Common\Controllers' => __DIR__.'/controllers/', |
|
30 | + 'Modules\Common\Models' => __DIR__.'/models/', |
|
31 | 31 | ) |
32 | 32 | ); |
33 | 33 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | public function registerServices(DiInterface $di) |
41 | 41 | { |
42 | 42 | // Registering a dispatcher |
43 | - $di->set('dispatcher', function () { |
|
43 | + $di->set('dispatcher', function() { |
|
44 | 44 | $dispatcher = new Dispatcher(); |
45 | 45 | $dispatcher->setDefaultNamespace("Modules\Common\Controllers"); |
46 | 46 | return $dispatcher; |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | |
49 | 49 | $appConfig = $di->get('config'); |
50 | 50 | $view = $di->get('view'); |
51 | - $view->setLayoutsDir( '_shared/'); |
|
51 | + $view->setLayoutsDir('_shared/'); |
|
52 | 52 | $view->setTemplateAfter($appConfig->view_layout_name); |
53 | - $view->setViewsDir( __DIR__ . '/views/'); |
|
53 | + $view->setViewsDir(__DIR__.'/views/'); |
|
54 | 54 | $di->set('view', $view); |
55 | 55 | } |
56 | 56 | } |
57 | 57 | \ No newline at end of file |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | return array( |
4 | 4 | |
5 | - /* |
|
5 | + /* |
|
6 | 6 | |-------------------------------------------------------------------------- |
7 | 7 | | View Engines |
8 | 8 | |-------------------------------------------------------------------------- |
@@ -14,19 +14,19 @@ discard block |
||
14 | 14 | | |
15 | 15 | */ |
16 | 16 | |
17 | - 'view_engines' => array( |
|
18 | - '.volt' => array( |
|
19 | - 'type' => '\Phalcon\Mvc\View\Engine\Volt', |
|
20 | - 'options' => array( |
|
21 | - 'compiledPath' => STORAGE_PATH . 'framework/views/', |
|
22 | - 'compiledSeparator' => '_', |
|
23 | - 'compiledExtension' => '.compiled', |
|
24 | - 'stat' => TRUE |
|
25 | - ) |
|
26 | - ) |
|
27 | - ), |
|
17 | + 'view_engines' => array( |
|
18 | + '.volt' => array( |
|
19 | + 'type' => '\Phalcon\Mvc\View\Engine\Volt', |
|
20 | + 'options' => array( |
|
21 | + 'compiledPath' => STORAGE_PATH . 'framework/views/', |
|
22 | + 'compiledSeparator' => '_', |
|
23 | + 'compiledExtension' => '.compiled', |
|
24 | + 'stat' => TRUE |
|
25 | + ) |
|
26 | + ) |
|
27 | + ), |
|
28 | 28 | |
29 | - /* |
|
29 | + /* |
|
30 | 30 | |-------------------------------------------------------------------------- |
31 | 31 | | View Layout Name |
32 | 32 | |-------------------------------------------------------------------------- |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | | |
37 | 37 | */ |
38 | 38 | |
39 | - 'view_layout_name' => 'main', |
|
39 | + 'view_layout_name' => 'main', |
|
40 | 40 | |
41 | - /* |
|
41 | + /* |
|
42 | 42 | |-------------------------------------------------------------------------- |
43 | 43 | | Application Name |
44 | 44 | |-------------------------------------------------------------------------- |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | | |
49 | 49 | */ |
50 | 50 | |
51 | - 'name' => "default.app", |
|
51 | + 'name' => "default.app", |
|
52 | 52 | |
53 | - /* |
|
53 | + /* |
|
54 | 54 | |-------------------------------------------------------------------------- |
55 | 55 | | Theme Layout Name |
56 | 56 | |-------------------------------------------------------------------------- |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | | |
62 | 62 | */ |
63 | 63 | |
64 | - 'theme_layout_name' => "default", |
|
64 | + 'theme_layout_name' => "default", |
|
65 | 65 | |
66 | - /* |
|
66 | + /* |
|
67 | 67 | |-------------------------------------------------------------------------- |
68 | 68 | | * Default Language |
69 | 69 | |-------------------------------------------------------------------------- |
@@ -73,9 +73,9 @@ discard block |
||
73 | 73 | | |
74 | 74 | */ |
75 | 75 | |
76 | - 'default_language' => 'en', |
|
76 | + 'default_language' => 'en', |
|
77 | 77 | |
78 | - /* |
|
78 | + /* |
|
79 | 79 | |-------------------------------------------------------------------------- |
80 | 80 | | Registering Namespaces |
81 | 81 | |-------------------------------------------------------------------------- |
@@ -96,11 +96,11 @@ discard block |
||
96 | 96 | | |
97 | 97 | */ |
98 | 98 | |
99 | - 'namespaces' => array( |
|
100 | - 'Modules\Common' => APPLICATION_PATH . 'modules/common/', |
|
101 | - ), |
|
99 | + 'namespaces' => array( |
|
100 | + 'Modules\Common' => APPLICATION_PATH . 'modules/common/', |
|
101 | + ), |
|
102 | 102 | |
103 | - /* |
|
103 | + /* |
|
104 | 104 | |-------------------------------------------------------------------------- |
105 | 105 | | Module Registration |
106 | 106 | |-------------------------------------------------------------------------- |
@@ -118,14 +118,14 @@ discard block |
||
118 | 118 | | |
119 | 119 | */ |
120 | 120 | |
121 | - 'modules' => array( |
|
122 | - 'common' => array( |
|
123 | - 'className' => 'Modules\Common\Module', |
|
124 | - 'path' => APPLICATION_PATH . 'modules/common/module.php' |
|
125 | - ) |
|
126 | - ), |
|
121 | + 'modules' => array( |
|
122 | + 'common' => array( |
|
123 | + 'className' => 'Modules\Common\Module', |
|
124 | + 'path' => APPLICATION_PATH . 'modules/common/module.php' |
|
125 | + ) |
|
126 | + ), |
|
127 | 127 | |
128 | - /* |
|
128 | + /* |
|
129 | 129 | |-------------------------------------------------------------------------- |
130 | 130 | | Default settings (MVC) |
131 | 131 | |-------------------------------------------------------------------------- |
@@ -135,13 +135,13 @@ discard block |
||
135 | 135 | | |
136 | 136 | */ |
137 | 137 | |
138 | - 'default_namespace' => 'Modules\Common\Controllers', |
|
139 | - 'default_module' => 'common', |
|
140 | - 'default_controller' => 'index', |
|
141 | - 'default_method' => 'index', |
|
138 | + 'default_namespace' => 'Modules\Common\Controllers', |
|
139 | + 'default_module' => 'common', |
|
140 | + 'default_controller' => 'index', |
|
141 | + 'default_method' => 'index', |
|
142 | 142 | |
143 | 143 | |
144 | - /* |
|
144 | + /* |
|
145 | 145 | |-------------------------------------------------------------------------- |
146 | 146 | | Default settings (Task) |
147 | 147 | |-------------------------------------------------------------------------- |
@@ -151,10 +151,10 @@ discard block |
||
151 | 151 | | |
152 | 152 | */ |
153 | 153 | |
154 | - 'default_task' => 'main', |
|
155 | - 'default_action' => 'main', |
|
154 | + 'default_task' => 'main', |
|
155 | + 'default_action' => 'main', |
|
156 | 156 | |
157 | - /* |
|
157 | + /* |
|
158 | 158 | |-------------------------------------------------------------------------- |
159 | 159 | | Extra/Trailing slashes |
160 | 160 | |-------------------------------------------------------------------------- |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | | |
167 | 167 | */ |
168 | 168 | |
169 | - 'extra_slashes' => TRUE, |
|
169 | + 'extra_slashes' => TRUE, |
|
170 | 170 | |
171 | - /* |
|
171 | + /* |
|
172 | 172 | |-------------------------------------------------------------------------- |
173 | 173 | | Application Debug Mode |
174 | 174 | |-------------------------------------------------------------------------- |
@@ -179,9 +179,9 @@ discard block |
||
179 | 179 | | |
180 | 180 | */ |
181 | 181 | |
182 | - 'debug' => FALSE, |
|
182 | + 'debug' => FALSE, |
|
183 | 183 | |
184 | - /* |
|
184 | + /* |
|
185 | 185 | |-------------------------------------------------------------------------- |
186 | 186 | | Do you need HTML Minification ? |
187 | 187 | |-------------------------------------------------------------------------- |
@@ -191,9 +191,9 @@ discard block |
||
191 | 191 | | |
192 | 192 | */ |
193 | 193 | |
194 | - 'html_minify' => FALSE, |
|
194 | + 'html_minify' => FALSE, |
|
195 | 195 | |
196 | - /* |
|
196 | + /* |
|
197 | 197 | |-------------------------------------------------------------------------- |
198 | 198 | | Application URL |
199 | 199 | |-------------------------------------------------------------------------- |
@@ -204,9 +204,9 @@ discard block |
||
204 | 204 | | |
205 | 205 | */ |
206 | 206 | |
207 | - 'base_url' => NULL, |
|
207 | + 'base_url' => NULL, |
|
208 | 208 | |
209 | - /* |
|
209 | + /* |
|
210 | 210 | |-------------------------------------------------------------------------- |
211 | 211 | | Application Timezone |
212 | 212 | |-------------------------------------------------------------------------- |
@@ -217,9 +217,9 @@ discard block |
||
217 | 217 | | |
218 | 218 | */ |
219 | 219 | |
220 | - 'timezone' => 'UTC', |
|
220 | + 'timezone' => 'UTC', |
|
221 | 221 | |
222 | - /* |
|
222 | + /* |
|
223 | 223 | |-------------------------------------------------------------------------- |
224 | 224 | | Encryption of Cookies |
225 | 225 | |-------------------------------------------------------------------------- |
@@ -231,9 +231,9 @@ discard block |
||
231 | 231 | | |
232 | 232 | */ |
233 | 233 | |
234 | - 'cookie_encryption' => TRUE, |
|
234 | + 'cookie_encryption' => TRUE, |
|
235 | 235 | |
236 | - /* |
|
236 | + /* |
|
237 | 237 | |-------------------------------------------------------------------------- |
238 | 238 | | Encryption Key |
239 | 239 | |-------------------------------------------------------------------------- |
@@ -244,9 +244,9 @@ discard block |
||
244 | 244 | | |
245 | 245 | */ |
246 | 246 | |
247 | - 'key' => 'this-is-my-secret-key', |
|
247 | + 'key' => 'this-is-my-secret-key', |
|
248 | 248 | |
249 | - /* |
|
249 | + /* |
|
250 | 250 | |-------------------------------------------------------------------------- |
251 | 251 | | Encryption Type |
252 | 252 | |-------------------------------------------------------------------------- |
@@ -256,9 +256,9 @@ discard block |
||
256 | 256 | | |
257 | 257 | */ |
258 | 258 | |
259 | - 'cipher' => MCRYPT_RIJNDAEL_256, |
|
259 | + 'cipher' => MCRYPT_RIJNDAEL_256, |
|
260 | 260 | |
261 | - /* |
|
261 | + /* |
|
262 | 262 | |-------------------------------------------------------------------------- |
263 | 263 | | Encryption Type |
264 | 264 | |-------------------------------------------------------------------------- |
@@ -267,9 +267,9 @@ discard block |
||
267 | 267 | | |
268 | 268 | */ |
269 | 269 | |
270 | - 'encryption_mode' => 'ecb', |
|
270 | + 'encryption_mode' => 'ecb', |
|
271 | 271 | |
272 | - /* |
|
272 | + /* |
|
273 | 273 | |-------------------------------------------------------------------------- |
274 | 274 | | Work Factor |
275 | 275 | |-------------------------------------------------------------------------- |
@@ -278,9 +278,9 @@ discard block |
||
278 | 278 | | |
279 | 279 | */ |
280 | 280 | |
281 | - 'work_factor' => 12, |
|
281 | + 'work_factor' => 12, |
|
282 | 282 | |
283 | - /* |
|
283 | + /* |
|
284 | 284 | |-------------------------------------------------------------------------- |
285 | 285 | | Application Path Registration |
286 | 286 | |-------------------------------------------------------------------------- |
@@ -304,13 +304,13 @@ discard block |
||
304 | 304 | | |
305 | 305 | */ |
306 | 306 | |
307 | - 'paths' => array( |
|
308 | - APPLICATION_PATH . 'controllers/', |
|
309 | - APPLICATION_PATH . 'models/', |
|
310 | - APPLICATION_PATH . 'tasks/' |
|
311 | - ), |
|
307 | + 'paths' => array( |
|
308 | + APPLICATION_PATH . 'controllers/', |
|
309 | + APPLICATION_PATH . 'models/', |
|
310 | + APPLICATION_PATH . 'tasks/' |
|
311 | + ), |
|
312 | 312 | |
313 | - /* |
|
313 | + /* |
|
314 | 314 | |-------------------------------------------------------------------------- |
315 | 315 | | Application Classes Registration |
316 | 316 | |-------------------------------------------------------------------------- |
@@ -332,9 +332,9 @@ discard block |
||
332 | 332 | | |
333 | 333 | */ |
334 | 334 | |
335 | - 'classes' => array(), |
|
335 | + 'classes' => array(), |
|
336 | 336 | |
337 | - /* |
|
337 | + /* |
|
338 | 338 | |-------------------------------------------------------------------------- |
339 | 339 | | Registering Prefixes |
340 | 340 | |-------------------------------------------------------------------------- |
@@ -356,9 +356,9 @@ discard block |
||
356 | 356 | | |
357 | 357 | */ |
358 | 358 | |
359 | - 'prefixes' => array(), |
|
359 | + 'prefixes' => array(), |
|
360 | 360 | |
361 | - /* |
|
361 | + /* |
|
362 | 362 | |-------------------------------------------------------------------------- |
363 | 363 | | Additional File Extensions |
364 | 364 | |-------------------------------------------------------------------------- |
@@ -370,9 +370,9 @@ discard block |
||
370 | 370 | | |
371 | 371 | */ |
372 | 372 | |
373 | - 'extensions' => array("php"), |
|
373 | + 'extensions' => array("php"), |
|
374 | 374 | |
375 | - /* |
|
375 | + /* |
|
376 | 376 | |-------------------------------------------------------------------------- |
377 | 377 | | Default libraries |
378 | 378 | |-------------------------------------------------------------------------- |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | | |
381 | 381 | */ |
382 | 382 | |
383 | - 'libraries' => array( |
|
384 | - 'session' => '\Phalcon\Session\Adapter\Files' |
|
385 | - ) |
|
383 | + 'libraries' => array( |
|
384 | + 'session' => '\Phalcon\Session\Adapter\Files' |
|
385 | + ) |
|
386 | 386 | ); |
387 | 387 | \ No newline at end of file |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | '.volt' => array( |
19 | 19 | 'type' => '\Phalcon\Mvc\View\Engine\Volt', |
20 | 20 | 'options' => array( |
21 | - 'compiledPath' => STORAGE_PATH . 'framework/views/', |
|
21 | + 'compiledPath' => STORAGE_PATH.'framework/views/', |
|
22 | 22 | 'compiledSeparator' => '_', |
23 | 23 | 'compiledExtension' => '.compiled', |
24 | 24 | 'stat' => TRUE |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | |
99 | 99 | 'namespaces' => array( |
100 | - 'Modules\Common' => APPLICATION_PATH . 'modules/common/', |
|
100 | + 'Modules\Common' => APPLICATION_PATH.'modules/common/', |
|
101 | 101 | ), |
102 | 102 | |
103 | 103 | /* |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | 'modules' => array( |
122 | 122 | 'common' => array( |
123 | 123 | 'className' => 'Modules\Common\Module', |
124 | - 'path' => APPLICATION_PATH . 'modules/common/module.php' |
|
124 | + 'path' => APPLICATION_PATH.'modules/common/module.php' |
|
125 | 125 | ) |
126 | 126 | ), |
127 | 127 | |
@@ -305,9 +305,9 @@ discard block |
||
305 | 305 | */ |
306 | 306 | |
307 | 307 | 'paths' => array( |
308 | - APPLICATION_PATH . 'controllers/', |
|
309 | - APPLICATION_PATH . 'models/', |
|
310 | - APPLICATION_PATH . 'tasks/' |
|
308 | + APPLICATION_PATH.'controllers/', |
|
309 | + APPLICATION_PATH.'models/', |
|
310 | + APPLICATION_PATH.'tasks/' |
|
311 | 311 | ), |
312 | 312 | |
313 | 313 | /* |