@@ -8,6 +8,10 @@ |
||
8 | 8 | public function drawFile( $_file, $_parameters = [] ) { |
9 | 9 | return $this->draw($_file, $_parameters); |
10 | 10 | } |
11 | + |
|
12 | + /** |
|
13 | + * @param string $_text |
|
14 | + */ |
|
11 | 15 | public function drawText( $_text, $_parameters = [] ) { |
12 | 16 | return $this->draw(trim($_text), $_parameters); |
13 | 17 | } |
@@ -5,13 +5,13 @@ |
||
5 | 5 | public function __construct() { |
6 | 6 | parent::__construct(); |
7 | 7 | } |
8 | - public function drawFile( $_file, $_parameters = [] ) { |
|
8 | + public function drawFile($_file, $_parameters = []) { |
|
9 | 9 | return $this->draw($_file, $_parameters); |
10 | 10 | } |
11 | - public function drawText( $_text, $_parameters = [] ) { |
|
11 | + public function drawText($_text, $_parameters = []) { |
|
12 | 12 | return $this->draw(trim($_text), $_parameters); |
13 | 13 | } |
14 | - public function draw( $_text, $_parameters = [] ) { |
|
14 | + public function draw($_text, $_parameters = []) { |
|
15 | 15 | $pug = new Pug\Pug(); |
16 | 16 | $page = $pug->render($_text, $_parameters); |
17 | 17 | return $page; |
@@ -14,6 +14,10 @@ |
||
14 | 14 | $page = $template->render($_parameters); |
15 | 15 | return $page; |
16 | 16 | } |
17 | + |
|
18 | + /** |
|
19 | + * @param string $_text |
|
20 | + */ |
|
17 | 21 | public function drawText( $_text, $_parameters = [] ) { |
18 | 22 | $loader = new Twig_Loader_Array([ |
19 | 23 | 'index' => $_text |
@@ -5,16 +5,16 @@ |
||
5 | 5 | public function __construct() { |
6 | 6 | parent::__construct(); |
7 | 7 | } |
8 | - public function drawFile( $_file, $_parameters = [] ) { |
|
9 | - $loader = new Twig_Loader_Filesystem('bundles/views'); |
|
10 | - $twig = new Twig_Environment( $loader, [ |
|
8 | + public function drawFile($_file, $_parameters = []) { |
|
9 | + $loader = new Twig_Loader_Filesystem('bundles/views'); |
|
10 | + $twig = new Twig_Environment($loader, [ |
|
11 | 11 | 'cache' => 'bundles/views', |
12 | 12 | ]); |
13 | 13 | $template = $twig->loadTemplate($_text); |
14 | 14 | $page = $template->render($_parameters); |
15 | 15 | return $page; |
16 | 16 | } |
17 | - public function drawText( $_text, $_parameters = [] ) { |
|
17 | + public function drawText($_text, $_parameters = []) { |
|
18 | 18 | $loader = new Twig_Loader_Array([ |
19 | 19 | 'index' => $_text |
20 | 20 | ]); |