/** * 渲染视图模版 * * @param string $viewname * * @return string */ protected function view($viewname) { $this->viewVars['_app'] = $this->app; $this->viewVars['_vt'] = $this->getViewTools(); $viewObj = new View($this->viewDir, $viewname, $this->viewVars); return $viewObj->execute(); }
public function cmdView(App $app, $type) { if ($this->enable) { $this->enable = false; if ('json' == $type) { return $this->getContent(); } if ('ui' == $type) { $view = new View(__DIR__ . '/_asdebug', 'ui', ['url' => $app->pagePathing('asdebug'), 'qargs' => $this->qargs]); return $view->execute(); } } return 422; }