Skip to content

Commit

Permalink
Rename view has method.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksleight committed Jul 2, 2015
1 parent cdfb00d commit e1d8165
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ public function extName($extName = null)
return $this->_extName;
}

public function has($name, $set = null)
public function valid($name, $set = null)
{
if (!isset($set)) {
if (!isset($set)) {
reset($this->_dirs);
$set = key($this->_dirs);
}
Expand Down Expand Up @@ -241,7 +241,7 @@ public function execute(\Coast\Request $req, \Coast\Response $res)
{
$path = $req->path();
$path = '/' . (strlen($path) ? $path : 'index');
if (!$this->has($path)) {
if (!$this->valid($path)) {
return false;
}
return $res->html($this->render($path, [
Expand Down

0 comments on commit e1d8165

Please sign in to comment.