Merge pull request #120 from sparksp/fix/route_before

Fixed route before filter
This commit is contained in:
Taylor Otwell 2011-10-16 19:33:26 -07:00
commit 494bc0b4a7
1 changed files with 3 additions and 2 deletions

View File

@ -95,7 +95,7 @@ public function call()
// request cycle makes tasks like authorization convenient. // request cycle makes tasks like authorization convenient.
$before = array_merge(array('before'), $this->filters('before')); $before = array_merge(array('before'), $this->filters('before'));
if ( ! is_null($response = $this->filter($before, array(), true))) if ( ! is_null($response = Filter::run($before, array(), true)))
{ {
return $response; return $response;
} }
@ -117,7 +117,7 @@ public function call()
Filter::run($filters, array($response)); Filter::run($filters, array($response));
return $response; return $response;
} }
} }
@ -209,6 +209,7 @@ public function handles($uri)
public function __call($method, $parameters) public function __call($method, $parameters)
{ {
if (strpos($method, 'is_') === 0) return $this->is(substr($method, 3)); if (strpos($method, 'is_') === 0) return $this->is(substr($method, 3));
throw new \Exception('Method "'.$method.'" not found', E_NOTICE);
} }
} }