minor refactoring.

This commit is contained in:
Taylor Otwell 2011-10-02 23:39:26 -05:00
parent eb956cc89d
commit 34452f5f08
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,13 @@
<?php namespace Laravel\Routing;
interface Destination {
/**
* Get an array of filter names defined for the destination.
*
* @param string $name
* @return array
*/
public function filters($name);
}

View File

@ -74,7 +74,7 @@ public function __construct($key, $callback, $parameters = array())
// obviously handle the requests to the route. An array can contain filters, as
// well as a Closure to handle requests to the route. A string, delegates control
// of the request to a controller method.
if ( ! $this->callback instanceof \Closure and ! is_array($this->callback) and ! is_string($this->callback))
if ( ! $this->callback instanceof Closure and ! is_array($this->callback) and ! is_string($this->callback))
{
throw new \Exception('Invalid route defined for URI ['.$this->key.']');
}