/** * Include a file in this template * * @param string $name * @param string $container * @throws \Exception */ function incl($name, $container = 'HTML', $vars = null) { if ($vars === null) { $_ = $this; } else { $_ = new Scope($vars, $this->handler); } $___path = Template::getPath($name, $container); if (!$___path) { throw new \Exception('Couldnt find ' . $name . ' from ' . $container . ' to include.'); } include $___path; }
function __construct($body, $vars = array(), $container = 'HTML', $name = self::DEFAULT_CONTAINER) { parent::__construct($name, $vars, $container); $this->body = $body; }