コード例 #1
0
ファイル: Scope.php プロジェクト: splitice/radical-web
 /**
  * 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;
 }
コード例 #2
0
 function __construct($body, $vars = array(), $container = 'HTML', $name = self::DEFAULT_CONTAINER)
 {
     parent::__construct($name, $vars, $container);
     $this->body = $body;
 }