minor refactoring.
This commit is contained in:
parent
eb956cc89d
commit
34452f5f08
|
@ -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);
|
||||||
|
|
||||||
|
}
|
|
@ -74,7 +74,7 @@ public function __construct($key, $callback, $parameters = array())
|
||||||
// obviously handle the requests to the route. An array can contain filters, as
|
// 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
|
// well as a Closure to handle requests to the route. A string, delegates control
|
||||||
// of the request to a controller method.
|
// 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.']');
|
throw new \Exception('Invalid route defined for URI ['.$this->key.']');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue