fixing route bundle determination.
This commit is contained in:
parent
643b440872
commit
3dab550681
|
@ -62,10 +62,9 @@ public function __construct($key, $action, $parameters = array())
|
||||||
$this->uris = array_map(array($this, 'extract'), $uris);
|
$this->uris = array_map(array($this, 'extract'), $uris);
|
||||||
|
|
||||||
// Determine the bundle in which the route was registered. We will know
|
// Determine the bundle in which the route was registered. We will know
|
||||||
// the bundle by the first segment of the route's URI. We need to know
|
// the bundle by feeding the URI into the bundle::handles method, which
|
||||||
// the bundle so we know if we need to run a bundle's global filters
|
// will return the bundle assigned to that URI.
|
||||||
// when executing the route.
|
$this->bundle = Bundle::handles($this->uris[0]);
|
||||||
$this->bundle = Bundle::resolve(head(explode('/', $this->uris[0])));
|
|
||||||
|
|
||||||
$this->parameters = array_map('urldecode', $parameters);
|
$this->parameters = array_map('urldecode', $parameters);
|
||||||
}
|
}
|
||||||
|
@ -147,10 +146,6 @@ public function response()
|
||||||
*/
|
*/
|
||||||
protected function filters($event)
|
protected function filters($event)
|
||||||
{
|
{
|
||||||
// Add the global filters to the array. We will also attempt to add
|
|
||||||
// the bundle's global filter as well. However, we'll need to keep
|
|
||||||
// the array unique since the default bundle's global filter will
|
|
||||||
// be the same as the application's global filter.
|
|
||||||
$filters = array_unique(array($event, Bundle::prefix($this->bundle).$event));
|
$filters = array_unique(array($event, Bundle::prefix($this->bundle).$event));
|
||||||
|
|
||||||
// Next wee will check to see if there are any filters attached
|
// Next wee will check to see if there are any filters attached
|
||||||
|
|
Loading…
Reference in New Issue