getType() публичный Метод

public getType ( ) : string
Результат string
Пример #1
0
 /**
  * Creates a route
  *
  * @param RouteInterface $resource
  *
  * @return null|SymfonyRoute
  */
 private function createRoute(RouteInterface $resource)
 {
     $route = null;
     foreach ($this->generators->all() as $generator) {
         if ($generator->supports($resource->getType())) {
             $route = $generator->generate($resource);
             break;
         }
     }
     if (null === $route) {
         throw new RouteNotFoundException(sprintf('No possible generator found for route "%s"', $resource->getId()));
     }
     return $route;
 }
Пример #2
0
 /**
  * Creates a route
  *
  * @param RouteInterface $resource
  *
  * @return null|SymfonyRoute
  */
 private function createRoute(RouteInterface $resource)
 {
     $route = null;
     /**
      * @var \WellCommerce\Bundle\RoutingBundle\Generator\RouteGeneratorInterface $generator
      */
     foreach ($this->generators as $generator) {
         if ($generator->supports($resource->getType())) {
             $route = $generator->generate($resource);
             break;
         }
     }
     if (null === $route) {
         throw new RouteNotFoundException(sprintf('No possible generator found for route "%s"', $resource->getId()));
     }
     return $route;
 }