Mpociot\ApiDoc\Generators\AbstractGenerator::getRouteGroup PHP Method

getRouteGroup() protected method

protected getRouteGroup ( string $route ) : string
$route string
return string
    protected function getRouteGroup($route)
    {
        list($class, $method) = explode('@', $route);
        $reflection = new ReflectionClass($class);
        $comment = $reflection->getDocComment();
        if ($comment) {
            $phpdoc = new DocBlock($comment);
            foreach ($phpdoc->getTags() as $tag) {
                if ($tag->getName() === 'resource') {
                    return $tag->getContent();
                }
            }
        }
        return 'general';
    }