This commit is contained in:
Fabien Potencier 2014-06-26 09:13:51 +02:00
parent 579c465831
commit 9567b9aac9
2 changed files with 10 additions and 3 deletions

View File

@ -63,9 +63,7 @@ class ControllerResolver extends BaseControllerResolver
list($service, $method) = explode(':', $controller, 2);
return array($this->container->get($service), $method);
} elseif ($this->container->has($controller) &&
method_exists($service = $this->container->get($controller), '__invoke')
) {
} elseif ($this->container->has($controller) && method_exists($service = $this->container->get($controller), '__invoke')) {
return $service;
} else {
throw new \LogicException(sprintf('Unable to parse the controller name "%s".', $controller));

View File

@ -1,5 +1,14 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
use Psr\Log\LoggerInterface;