Trim comment bloat from Route class.

This commit is contained in:
Taylor Otwell 2011-07-06 15:02:01 -07:00
parent e334fd80b6
commit cf8e5e2f80
1 changed files with 3 additions and 13 deletions

View File

@ -49,27 +49,17 @@ public function call()
{
$response = null;
// ------------------------------------------------------------
// If the route value is just a function, all we have to do
// is execute the function! There are no filters to call.
// ------------------------------------------------------------
if (is_callable($this->callback))
{
$response = call_user_func_array($this->callback, $this->parameters);
}
// ------------------------------------------------------------
// If the route value is an array, we'll need to check it for
// any filters that may be attached.
// ------------------------------------------------------------
// If the route value is an array, we'll need to check it for any filters that may be attached.
elseif (is_array($this->callback))
{
$response = isset($this->callback['before']) ? Route\Filter::call($this->callback['before'], array(), true) : null;
// ------------------------------------------------------------
// We verify that the before filters did not return a response
// Before filters can override the request cycle to make things
// like authentication convenient to implement.
// ------------------------------------------------------------
// Verify that the before filters did not return a response. Before filters can override
// the request cycle to make things like authentication more convenient.
if (is_null($response) and isset($this->callback['do']))
{
$response = call_user_func_array($this->callback['do'], $this->parameters);