From 36301b2e002dba28d2a6ede9a2acf5bc4d122d82 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Tue, 30 Jul 2013 19:15:31 +0300 Subject: [PATCH] explicitely pass template environment --- ipf/template.php | 2 +- ipf/template/file.php | 4 ++-- ipf/template/string.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ipf/template.php b/ipf/template.php index 18c03ef..fd9b27b 100644 --- a/ipf/template.php +++ b/ipf/template.php @@ -4,7 +4,7 @@ abstract class IPF_Template { protected $environment; - public function __construct($environment) + public function __construct(IPF_Template_Environment $environment) { $this->environment = $environment; } diff --git a/ipf/template/file.php b/ipf/template/file.php index 50e0144..2c813eb 100644 --- a/ipf/template/file.php +++ b/ipf/template/file.php @@ -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; } diff --git a/ipf/template/string.php b/ipf/template/string.php index 09a6f5f..835e55a 100644 --- a/ipf/template/string.php +++ b/ipf/template/string.php @@ -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; } -- 2.49.0