diff --git a/src/view/driver/Think.php b/src/view/driver/Think.php index 1e2b585..ea8f66e 100644 --- a/src/view/driver/Think.php +++ b/src/view/driver/Think.php @@ -48,7 +48,7 @@ public function __construct(App $app, array $config = []) $this->config['view_path'] = $this->app->getAppPath() . 'view' . DIRECTORY_SEPARATOR; } - $this->template = new Template($app, $this->config); + $this->template = new Template($this->config); } /** @@ -90,7 +90,7 @@ public function fetch(string $template, array $data = []): void $this->app['log'] ->record('[ VIEW ] ' . $template . ' [ ' . var_export(array_keys($data), true) . ' ]'); - $this->template->assign($data)->fetch($template); + $this->template->fetch($template, $data); } /** @@ -102,7 +102,7 @@ public function fetch(string $template, array $data = []): void */ public function display(string $template, array $data = []): void { - $this->template->assign($data)->display($template); + $this->template->display($template, $data); } /**