Merge pull request #615 from awellis13/feature/route-cleanup
Laravel\Route PHPDoc cleanup and removed $uri from Route::parameters().
This commit is contained in:
commit
641f1d4c14
|
@ -47,11 +47,10 @@ class Route {
|
||||||
/**
|
/**
|
||||||
* Create a new Route instance.
|
* Create a new Route instance.
|
||||||
*
|
*
|
||||||
* @param string $method
|
* @param string $method
|
||||||
* @param string $uri
|
* @param string $uri
|
||||||
* @param array $action
|
* @param array $action
|
||||||
* @param array $parameters
|
* @param array $parameters
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function __construct($method, $uri, $action, $parameters = array())
|
public function __construct($method, $uri, $action, $parameters = array())
|
||||||
{
|
{
|
||||||
|
@ -67,18 +66,17 @@ public function __construct($method, $uri, $action, $parameters = array())
|
||||||
// We'll set the parameters based on the number of parameters passed
|
// We'll set the parameters based on the number of parameters passed
|
||||||
// compared to the parameters that were needed. If more parameters
|
// compared to the parameters that were needed. If more parameters
|
||||||
// are needed, we'll merge in defaults.
|
// are needed, we'll merge in defaults.
|
||||||
$this->parameters($uri, $action, $parameters);
|
$this->parameters($action, $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the parameters array to the correct value.
|
* Set the parameters array to the correct value.
|
||||||
*
|
*
|
||||||
* @param string $uri
|
|
||||||
* @param array $action
|
* @param array $action
|
||||||
* @param array $parameters
|
* @param array $parameters
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function parameters($uri, $action, $parameters)
|
protected function parameters($action, $parameters)
|
||||||
{
|
{
|
||||||
$defaults = (array) array_get($action, 'defaults');
|
$defaults = (array) array_get($action, 'defaults');
|
||||||
|
|
||||||
|
@ -114,7 +112,7 @@ public function call()
|
||||||
|
|
||||||
// We always return a Response instance from the route calls, so
|
// We always return a Response instance from the route calls, so
|
||||||
// we'll use the prepare method on the Response class to make
|
// we'll use the prepare method on the Response class to make
|
||||||
// sure we have a valid Response isntance.
|
// sure we have a valid Response instance.
|
||||||
$response = Response::prepare($response);
|
$response = Response::prepare($response);
|
||||||
|
|
||||||
Filter::run($this->filters('after'), array($response));
|
Filter::run($this->filters('after'), array($response));
|
||||||
|
@ -252,7 +250,7 @@ public function is($name)
|
||||||
/**
|
/**
|
||||||
* Register a controller with the router.
|
* Register a controller with the router.
|
||||||
*
|
*
|
||||||
* @param string|array $controller
|
* @param string|array $controllers
|
||||||
* @param string|array $defaults
|
* @param string|array $defaults
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -394,4 +392,4 @@ public static function forward($method, $uri)
|
||||||
return Router::route(strtoupper($method), $uri)->call();
|
return Router::route(strtoupper($method), $uri)->call();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue