mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/controller] Allow injecting Symfony Request into controllers
PHPBB3-10864
This commit is contained in:
parent
8913b2c7c4
commit
4d6f6351dd
1 changed files with 4 additions and 0 deletions
|
@ -109,6 +109,10 @@ class phpbb_controller_resolver implements ControllerResolverInterface
|
||||||
{
|
{
|
||||||
$arguments[] = $attributes[$param->name];
|
$arguments[] = $attributes[$param->name];
|
||||||
}
|
}
|
||||||
|
else if ($param->getClass() && $param->getClass()->isInstance($request))
|
||||||
|
{
|
||||||
|
$arguments[] = $request;
|
||||||
|
}
|
||||||
else if ($param->isDefaultValueAvailable())
|
else if ($param->isDefaultValueAvailable())
|
||||||
{
|
{
|
||||||
$arguments[] = $param->getDefaultValue();
|
$arguments[] = $param->getDefaultValue();
|
||||||
|
|
Loading…
Add table
Reference in a new issue