mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Add tests
This commit is contained in:
@ -430,18 +430,18 @@ class Fenom
|
||||
"float_tags" => array()
|
||||
);
|
||||
if (method_exists($storage, $compiler . "Open")) {
|
||||
$c["open"] = $compiler . "Open";
|
||||
$c["open"] = array($storage, $compiler . "Open");
|
||||
} else {
|
||||
throw new \LogicException("Open compiler {$compiler}Open not found");
|
||||
}
|
||||
if (method_exists($storage, $compiler . "Close")) {
|
||||
$c["close"] = $compiler . "Close";
|
||||
$c["close"] = array($storage, $compiler . "Close");
|
||||
} else {
|
||||
throw new \LogicException("Close compiler {$compiler}Close not found");
|
||||
}
|
||||
foreach ($tags as $tag) {
|
||||
if (method_exists($storage, "tag" . $tag)) {
|
||||
$c["tags"][$tag] = "tag" . $tag;
|
||||
$c["tags"][$tag] = array($storage, "tag" . $tag);
|
||||
if ($floats && in_array($tag, $floats)) {
|
||||
$c['float_tags'][$tag] = 1;
|
||||
}
|
||||
@ -767,7 +767,6 @@ class Fenom
|
||||
$fenom = $this; // used in template
|
||||
$_tpl = include($this->_compile_dir . "/" . $file_name);
|
||||
/* @var Fenom\Render $_tpl */
|
||||
// var_dump($tpl, $_tpl->isValid()); exit;
|
||||
if (!($this->_options & self::AUTO_RELOAD) || ($this->_options & self::AUTO_RELOAD) && $_tpl->isValid()) {
|
||||
return $_tpl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user