protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot)
    {
        // controller
        $classAnnot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass);
        if ($classAnnot instanceof FrameworkExtraBundleRoute && $service = $classAnnot->getService()) {
            $route->setDefault('_controller', $service.':'.$method->getName());
        } elseif ('__invoke' === $method->getName()) {
            $route->setDefault('_controller', $class->getName());
        } else {
            $route->setDefault('_controller', $class->getName().'::'.$method->getName());
        }

        // requirements (@Method)
        foreach ($this->reader->getMethodAnnotations($method) as $configuration) {
            if ($configuration instanceof Method) {
                $route->setMethods($configuration->getMethods());
            } elseif ($configuration instanceof FrameworkExtraBundleRoute && $configuration->getService()) {
                throw new \LogicException('The service option can only be specified at class level.');
            }
        }
    }
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot)
    {
        // controller
        $classAnnot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass);
        if ($classAnnot instanceof FrameworkExtraBundleRoute && $service = $classAnnot->getService()) {
            $route->setDefault('_controller', $service.':'.$method->getName());
        } elseif ('__invoke' === $method->getName()) {
            $route->setDefault('_controller', $class->getName());
        } else {
            $route->setDefault('_controller', $class->getName().'::'.$method->getName());
        }

        // requirements (@Method)
        foreach ($this->reader->getMethodAnnotations($method) as $configuration) {
            if ($configuration instanceof Method) {
                $route->setMethods($configuration->getMethods());
            } elseif ($configuration instanceof FrameworkExtraBundleRoute && $configuration->getService()) {
                throw new \LogicException('The service option can only be specified at class level.');
            }
        }
    }
protected function configureRoute ( Route $ route , \ ReflectionClass $ class , \ ReflectionMethod $ method , $ annot ) { // controller $ classAnnot = $ this -> reader -> getClassAnnotation ( $ class , $ this -> routeAnnotationClass ) ; if ( $ classAnnot instanceof FrameworkExtraBundleRoute && $ service = $ classAnnot -> getService ( ) ) { $ route -> setDefault ( '_controller' , $ service . ':' . $ method -> getName ( ) ) ; } elseif ( '__invoke' === $ method -> getName ( ) ) { $ route -> setDefault ( '_controller' , $ class -> getName ( ) ) ; } else { $ route -> setDefault ( '_controller' , $ class -> getName ( ) . '::' . $ method -> getName ( ) ) ; } // requirements (@Method) foreach ( $ this -> reader -> getMethodAnnotations ( $ method ) as $ configuration ) { if ( $ configuration instanceof Method ) { $ route -> setMethods ( $ configuration -> getMethods ( ) ) ; } elseif ( $ configuration instanceof FrameworkExtraBundleRoute && $ configuration -> getService ( ) ) { throw new \ LogicException ( 'The service option can only be specified at class level.' ) ; } } }
Configures the _controller default parameter and eventually the HTTP method
requirement of a given Route instance.

@param mixed $annot The annotation class instance

@throws \LogicException When the service option is specified on a method
Configures the _controller default parameter and eventually the HTTP method requirement of a given Route instance .