processRoute() abstract public method

abstract public processRoute ( Illuminate\Routing\Route $route, array $bindings = [], boolean $withResponse = true ) : array
$route Illuminate\Routing\Route
$bindings array
$withResponse boolean
return array
コード例 #1
0
 /**
  * @param AbstractGenerator $generator
  * @param $allowedRoutes
  * @param $routePrefix
  *
  * @return array
  */
 private function processDingoRoutes(AbstractGenerator $generator, $allowedRoutes, $routePrefix, $middleware)
 {
     $withResponse = $this->option('noResponseCalls') === false;
     $routes = $this->getRoutes();
     $bindings = $this->getBindings();
     $parsedRoutes = [];
     foreach ($routes as $route) {
         if (empty($allowedRoutes) || in_array($route->getName(), $allowedRoutes) || str_is($routePrefix, $route->uri()) || in_array($middleware, $route->middleware())) {
             if ($this->isValidRoute($route) && $this->isRouteVisibleForDocumentation($route->getAction()['uses'])) {
                 $parsedRoutes[] = $generator->processRoute($route, $bindings, $this->option('header'), $withResponse);
                 $this->info('Processed route: [' . implode(',', $route->getMethods()) . '] ' . $route->uri());
             } else {
                 $this->warn('Skipping route: [' . implode(',', $route->getMethods()) . '] ' . $route->uri());
             }
         }
     }
     return $parsedRoutes;
 }