for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* (c) Kévin Dunglas <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Dunglas\ActionBundle\Routing;
use Symfony\Component\Routing\Loader\AnnotationClassLoader as BaseAnnotationClassLoader;
use Symfony\Component\Routing\Route;
/**
* Sets the '_controller' default based on the service name associated with the action.
* @author Kévin Dunglas <[email protected]>
class AnnotationClassLoader extends BaseAnnotationClassLoader
{
* {@inheritdoc}
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot)
$route->setDefault('_controller', sprintf('controller.%s:%s', $class->name, $method->name));
}