示例#1
0
 public function __construct()
 {
     $this->app = App::instance();
     if (!$this->templatePath) {
         $this->templatePath = $this->app->get('templatePath');
     }
     if (!$this->viewPath) {
         $fullClass = get_called_class();
         $pos = strrpos($fullClass, '\\');
         $nsp = false === $pos ? '/' : substr($fullClass, 0, $pos);
         $this->viewPath = Helper::fixSlashes(dirname(dirname(__DIR__)) . '/' . $nsp . '/view/');
     }
 }
示例#2
0
 public function __construct()
 {
     $this->data['templatePath'] = Helper::fixSlashes(dirname(__DIR__) . '/template');
 }