mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 11:54:26 +02:00
- allow $tpl->display(), $tpl->fetch(); and $tpl->is_cached() calls on template objects
This commit is contained in:
@@ -444,7 +444,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Exception("Resource '$this->resource_type' must use compiler");
|
throw new Exception("Resource '$this->resource_type' must use compiler");
|
||||||
}
|
}
|
||||||
$this->render_time += $this->_get_time() - $_start_time;
|
$this->render_time += $this->_get_time() - $_start_time;
|
||||||
$this->rendered_content = ob_get_clean();
|
$this->rendered_content = ob_get_clean();
|
||||||
@@ -665,6 +665,29 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wrapper for display
|
||||||
|
*/
|
||||||
|
public function display ()
|
||||||
|
{
|
||||||
|
return $this->smarty->display($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wrapper for fetch
|
||||||
|
*/
|
||||||
|
public function fetch ()
|
||||||
|
{
|
||||||
|
return $this->smarty->fetch($this);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* wrapper for is_cached
|
||||||
|
*/
|
||||||
|
public function is_cached ()
|
||||||
|
{
|
||||||
|
return $this->iscached();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user