]> git.andy128k.dev Git - ipf-template.git/commitdiff
explicitely pass template environment
authorAndrey Kutejko <andy128k@gmail.com>
Tue, 30 Jul 2013 16:15:31 +0000 (19:15 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Tue, 30 Jul 2013 16:15:31 +0000 (19:15 +0300)
ipf/template.php
ipf/template/file.php
ipf/template/string.php

index 18c03ef989d322e0aa44c7231f3d0a322993a616..fd9b27b8a1de537c4ae1154297d15762e082e936 100644 (file)
@@ -4,7 +4,7 @@ abstract class IPF_Template
 {
     protected $environment;
 
-    public function __construct($environment)
+    public function __construct(IPF_Template_Environment $environment)
     {
         $this->environment = $environment;
     }
index 50e01442dc04e196520ee05ceb4b89c68ed39926..2c813eb470573d2ab1f567f935994dc6c5462eaa 100644 (file)
@@ -4,9 +4,9 @@ class IPF_Template_File extends IPF_Template
 {
     private $tpl;
 
-    function __construct($template, $environment=null)
+    function __construct($template, IPF_Template_Environment $environment)
     {
-        parent::__construct($environment ? $environment : IPF_Template_Environment::getDefault());
+        parent::__construct($environment);
         $this->tpl = $template;
     }
 
index 09a6f5f373bc3247663d3cf5dab1b6b8fcd8ee19..835e55a98a82fc96cb112444d7784d7fb72b94d8 100644 (file)
@@ -4,9 +4,9 @@ class IPF_Template_String extends IPF_Template
 {
     private $tpl;
 
-    function __construct($template, $environment=null)
+    function __construct($template, IPF_Template_Environment $environment)
     {
-        parent::__construct($environment ? $environment : IPF_Template_Environment::getDefault());
+        parent::__construct($environment);
         $this->tpl = $template;
     }