@@ -12,31 +12,31 @@ |
||
12 | 12 | { |
13 | 13 | parent::template($config); |
14 | 14 | |
15 | - $this->getTwig()->addFunction(new Twig_SimpleFunction('d', function ($var) { |
|
15 | + $this->getTwig()->addFunction(new Twig_SimpleFunction('d', function($var) { |
|
16 | 16 | return d($var); |
17 | 17 | })); |
18 | 18 | |
19 | - $this->getTwig()->addFunction(new Twig_SimpleFunction('date', function ($var) { |
|
19 | + $this->getTwig()->addFunction(new Twig_SimpleFunction('date', function($var) { |
|
20 | 20 | return date($var); |
21 | 21 | })); |
22 | 22 | |
23 | - $this->getTwig()->addFunction(new Twig_SimpleFunction('auth', function () { |
|
23 | + $this->getTwig()->addFunction(new Twig_SimpleFunction('auth', function() { |
|
24 | 24 | return $this->container()->get('auth')->access(); |
25 | 25 | })); |
26 | 26 | |
27 | - $this->getTwig()->addFunction(new Twig_SimpleFunction('active', function ($link, $page) { |
|
27 | + $this->getTwig()->addFunction(new Twig_SimpleFunction('active', function($link, $page) { |
|
28 | 28 | if ($link == $page) { |
29 | 29 | echo 'class="active"'; |
30 | 30 | } |
31 | 31 | })); |
32 | 32 | |
33 | - $this->getTwig()->addFunction(new Twig_SimpleFunction('value', function ($var) { |
|
33 | + $this->getTwig()->addFunction(new Twig_SimpleFunction('value', function($var) { |
|
34 | 34 | if ($this->container()->hasSession('value', $var)) { |
35 | 35 | return $this->container()->getSession('value', $var); |
36 | 36 | } |
37 | 37 | })); |
38 | 38 | |
39 | - $this->getTwig()->addFunction(new Twig_SimpleFunction('alert', function ($value, $style, $label = null) { |
|
39 | + $this->getTwig()->addFunction(new Twig_SimpleFunction('alert', function($value, $style, $label = null) { |
|
40 | 40 | if ($this->container()->hasSession('alert', $value)) { |
41 | 41 | return '<div class="alert alert-' . $style . '" style="padding: 15px">' . $this->container()->getSession('alert', $value) . $label . '</div>'; |
42 | 42 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | //(new Whoops\Run)->pushHandler(new Whoops\Handler\PrettyPageHandler)->register(); |
8 | 8 | |
9 | 9 | rudra()->setConfig(Symfony\Component\Yaml\Yaml::parse(file_get_contents('../app/config.yml'))); |
10 | -rudra()->addConfig('url', (php_sapi_name() == 'cli-server') ? 'http://127.0.0.1:8000' |
|
10 | +rudra()->addConfig('url', (php_sapi_name() == 'cli-server') ? 'http://127.0.0.1:8000' |
|
11 | 11 | : rudra()->getServer('REQUEST_SCHEME') . "://" . rudra()->getServer('SERVER_NAME')); |
12 | 12 | rudra()->setServices(require_once '../app/services.php'); // Set Services |
13 | 13 | rudra()->get('debugbar')['time']->startMeasure('Index', 'Index'); |