From: Andrey Kutejko Date: Tue, 30 Jul 2013 20:29:34 +0000 (+0300) Subject: configurable debug mode for filesystem environment X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=fcf131993813616cc2ed3cf69ef768c61c8de64c;p=ipf-template.git configurable debug mode for filesystem environment --- diff --git a/ipf/template/environment/filesystem.php b/ipf/template/environment/filesystem.php index 5f053ed..42c3aa5 100644 --- a/ipf/template/environment/filesystem.php +++ b/ipf/template/environment/filesystem.php @@ -4,6 +4,7 @@ class IPF_Template_Environment_FileSystem extends IPF_Template_Environment { public $folders = array(); public $cache = ''; + public $debug = false; public function __construct($folders, $cache) { @@ -29,7 +30,7 @@ class IPF_Template_Environment_FileSystem extends IPF_Template_Environment { $_tmp = var_export($this->folders, true); $filename = $this->cache.'/IPF_Template-'.md5($_tmp.(string)$template).'.phps'; - if (IPF::get('debug') or !file_exists($filename)) { + if ($this->debug or !file_exists($filename)) { $this->write($filename, $template->compile()); } return $filename;