Return route controller class doc block if comments are provided else return null.

@param \Illuminate\Routing\Route $route
@return DocBlock|null
342693
protected function getRouteControllerDocBlock($route)
	{
		$routeAction = $route->getAction();
		list($class, $method) = explode('@', $routeAction['uses']);

		$reflectionClass = new ReflectionClass($class);

		$comment = $reflectionClass->getDocComment();

		if ($comment) {
			return($this->docBlockFactory->create($comment));
		}

		return null;
	}
128603
public function getPathValidated(Route\Route $route)
    {
        $parameters = $route->getParameters();
        if (count($parameters)) {
            $arity = '[' . count($parameters) . ']';
        } else {
            $arity = '[0]';
        }
        $key = $route->withoutAttributes()->__toString();
        $pattern = null;
        if (isset($this->paths[$key . $arity])) {
            $pattern = $this->paths[$key . $arity]['pattern'];
        } elseif (isset($this->paths[$key . '[*]'])) {
            $pattern = $this->paths[$key . '[*]']['pattern'];
        }
        $path = $route->getPath($pattern);
        if (! isset($path)) {
            throw new Route\RouteException('Could not find path for: ' . $key . $arity);
        }
        return $path;
    }
40879
protected function getHandlerForRoute(Route $route, ProtocolInterface $protocol)
    {
        $handlerId = $route->getDefault(Protocol::OPTION_HANDLER);
        if ($handlerId) {
            $handlerId = substr($handlerId, 1);

            return $this->getContainer()->get($handlerId);
        } else {
            return $protocol->getDefaultHandler();
        }
    }
516169
protected function getRouteResource($route)
	{
		if (!config('openapischemas.resource_tag')) {
			$this->parentCommand->error('The "resource_tag" value in your apischemas.php configuration file must defined.');
			exit();
		}
		$routeAction = $route->getAction();
		list($class, $method) = explode('@', $routeAction['uses']);
		$reflection = new ReflectionClass($class);

		$comment = $reflection->getDocComment();
		if ($comment) {
			$docBlock = $this->docBlockFactory->create($comment);
			foreach ($docBlock->getTags() as $tag) {
				if ($tag->getName() === config('openapischemas.resource_tag')) {
					return $tag->getDescription()->render();
				}
			}
		}

		return null;
	}
1049098
private function target(Route $route)
    {
        $params = $route->getParams();

        $target = new Target($params['controller']);

        unset($params['controller']);

        if (isset($params['action'])) {
            $target->setAction($params['action']);
            unset($params['action']);
        }

        $target->setParams($params);

        return $target;
    }
823978
protected function buildRoute(Route $route)
    {
        if ($route->getBlock()) {
            return $route;
        }

        list($pattern, $params) = $this->parsePlaceholders($route->getPattern());
        return $route->setPatternWithoutReset($pattern)->setParams($params)->setBlock(true);
    }
1160379
public function getControllerFromRoute(Route $route)
    {
        $ret = false;
        $actionParts = explode(':', $route->getDefault('_controller'));

        if (count($actionParts) == 2) {
            $ret = $this->container->get($actionParts[0]);
        }

        return $ret;
    }
229947
public function add(Route $route)
    {
        // $this->routes[$route->method()][$route->uri()] = $route;
        $this->routes[$route->method().$route->route()] = $route;
        return $route;
    }
579604
protected function getRouteScheme( $route )
	{
		if ( $route->httpOnly() )
		{
			return $this->getScheme( false );
		}
		elseif ( $route->httpsOnly() )
		{
			return $this->getScheme( true );
		}

		return $this->getScheme( null );
	}
1341147
public function getPermFromRoute($route) {
    $menu_info = Config::get($this->config_path);

    foreach ($menu_info as $menu) {
      if ($menu[$this->route_variable_index] == $route) {
        return $menu[$this->pemissions_variable_index];
      }
    }
  }
7705
protected function callAttachedBefores($route, $request)
	{
		foreach ($route->beforeFilters() as $filter => $parameters)
		{
			$response = $this->callRouteFilter($filter, $parameters, $route, $request);

			if ( ! is_null($response)) return $response;
		}
	}
153184
protected function buildRouteAction(Route $route)
    {
        $action = $route->getAction();

        if ($action instanceof \Closure) {

            $controller = new Controller();

            return $action->bindTo($controller, get_class($controller));
        }

        list ($class, $method) = $action;

        $class = new $class;

        return [$class, $method];
    }
151646
public function mapRoute(Route $route)
    {
        $optionsRoute = clone $route;
        $optionsRoute->setMethods(array('OPTIONS'));
        $optionsRoute->setDefault(
            '_controller',
            'ezpublish_rest.controller.options:getRouteOptions'
        );

        $optionsRoute->setDefault(
            'allowedMethods',
            implode(',', $route->getMethods())
        );

        return $optionsRoute;
    }
1242534
protected function compile($route)
    {
        if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
            foreach ($matches as $match) {
                list($block, $pre, $type, $param, $optional) = $match;

                if (isset($this->_match_types[$type])) {
                    $type = $this->_match_types[$type];
                }
                if ($pre === '.') {
                    $pre = '\.';
                }

                //Older versions of PCRE require the 'P' in (?P<named>)
                $pattern = '(?:'
                    .($pre !== '' ? $pre : null)
                    .'('
                    .($param !== '' ? "?P<$param>" : null)
                    .$type
                    .'))'
                    .($optional !== '' ? '?' : null);

                $route = str_replace($block, $pattern, $route);
            }
        }

        return "`^$route$`u";
    }
309334
public function createController($route)
    {
        preg_match('/(default)/', $route, $match);
        if (isset($match[0]))
            return parent::createController($route);

        return parent::createController("{$this->defaultRoute}/{$route}");
    }
226424
private function checkForMetaRoute($route)
    {
        $this->baseRoute = $route;
        $this->metaRoute = null;

        // If route exits in index, use it
        if ($this->mapRoute2IndexKey($route)) {
            return $route;
        }

        // Check for pagination
        $pagination = $this->config["pagination"];
        $matches = [];
        $pattern = "/(.*?)\/($pagination)\/(\d+)$/";
        if (preg_match($pattern, $route, $matches)) {
            $this->baseRoute = $matches[1];
            $this->metaRoute = $route;
            $this->currentPage = $matches[3];
        }

        return $this->baseRoute;
    }
10811
private function trackRoute(Route $route)
    {
        return $this->getModel()->newQuery()->firstOrCreate([
            'name'   => $this->getRouteName($route),
            'action' => $route->getActionName(),
        ])->getKey();
    }