Skip to content

Commit

Permalink
edit response
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanChenLi committed Nov 1, 2019
1 parent 87d36b6 commit 3f06c65
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 20 deletions.
136 changes: 118 additions & 18 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public function extend(string $rule, callable $callback = null): void
* @param array $vars 模板变量
* @return void
*/
public function fetch(string $template, array $vars = []): void
public function fetch(string $template, array $vars = [])
{
if ($vars) {
$this->data = array_merge($this->data, $vars);
Expand Down Expand Up @@ -258,7 +258,7 @@ public function fetch(string $template, array $vars = []): void
$this->cache->set($this->config['cache_id'], $content, $this->config['cache_time']);
}

echo $content;
return $content;
}
}

Expand Down

0 comments on commit 3f06c65

Please sign in to comment.