protected function extractMethodInfo($namespace, \ReflectionMethod $method, \ReflectionClass $reflection, $module)
    {
        $methodInfo = NULL;
        $docComments = $method->getDocComment();
        if (FALSE !== $docComments && preg_match('/\@route\ /i', $docComments)) {
            $api = $this->extractApi($reflection->getDocComment());
            list($route, $info) = RouterHelper::extractRouteInfo($method, $api, $module);
            $route = explode('#|#', $route);
            $modelNamespace = str_replace('Api', 'Models', $namespace);
            if ($info['visible'] && !$this->checkDeprecated($docComments)) {
                try {
                    $return = $this->extractReturn($modelNamespace, $docComments);
                    $url = array_pop($route);
                    $methodInfo = [
                        'url' => str_replace('/' . $module . '/api', '', $url),
                        'method' => $info['http'],
                        'description' => $info['label'],
                        'return' => $return,
                        'objects' => array_key_exists('objects', $return) ? $return['objects'] : [],
                        'class' => $reflection->getShortName(),
                    ];
                    unset($methodInfo['return']['objects']);
                    $this->setRequestParams($method, $methodInfo, $modelNamespace, $docComments);
                    $this->setQueryParams($method, $methodInfo);
                    $this->setRequestHeaders($reflection, $methodInfo);
                } catch (\Exception $e) {
                    Logger::log($e->getMessage(), LOG_ERR);
                }
            }
        }

        return $methodInfo;
    }
protected function extractMethodInfo($namespace, \ReflectionMethod $method, \ReflectionClass $reflection, $module)
    {
        $methodInfo = NULL;
        $docComments = $method->getDocComment();
        if (FALSE !== $docComments && preg_match('/\@route\ /i', $docComments)) {
            $api = $this->extractApi($reflection->getDocComment());
            list($route, $info) = RouterHelper::extractRouteInfo($method, $api, $module);
            $route = explode('#|#', $route);
            $modelNamespace = str_replace('Api', 'Models', $namespace);
            if ($info['visible'] && !$this->checkDeprecated($docComments)) {
                try {
                    $return = $this->extractReturn($modelNamespace, $docComments);
                    $url = array_pop($route);
                    $methodInfo = [
                        'url' => str_replace('/' . $module . '/api', '', $url),
                        'method' => $info['http'],
                        'description' => $info['label'],
                        'return' => $return,
                        'objects' => array_key_exists('objects', $return) ? $return['objects'] : [],
                        'class' => $reflection->getShortName(),
                    ];
                    unset($methodInfo['return']['objects']);
                    $this->setRequestParams($method, $methodInfo, $modelNamespace, $docComments);
                    $this->setQueryParams($method, $methodInfo);
                    $this->setRequestHeaders($reflection, $methodInfo);
                } catch (\Exception $e) {
                    Logger::log($e->getMessage(), LOG_ERR);
                }
            }
        }

        return $methodInfo;
    }
protected function extractMethodInfo ( $ namespace , \ ReflectionMethod $ method , \ ReflectionClass $ reflection , $ module ) { $ methodInfo = NULL ; $ docComments = $ method -> getDocComment ( ) ; if ( FALSE !== $ docComments && preg_match ( '/\@route\ /i' , $ docComments ) ) { $ api = $ this -> extractApi ( $ reflection -> getDocComment ( ) ) ; list ( $ route , $ info ) = RouterHelper :: extractRouteInfo ( $ method , $ api , $ module ) ; $ route = explode ( '#|#' , $ route ) ; $ modelNamespace = str_replace ( 'Api' , 'Models' , $ namespace ) ; if ( $ info [ 'visible' ] && ! $ this -> checkDeprecated ( $ docComments ) ) { try { $ return = $ this -> extractReturn ( $ modelNamespace , $ docComments ) ; $ url = array_pop ( $ route ) ; $ methodInfo = [ 'url' => str_replace ( '/' . $ module . '/api' , '' , $ url ) , 'method' => $ info [ 'http' ] , 'description' => $ info [ 'label' ] , 'return' => $ return , 'objects' => array_key_exists ( 'objects' , $ return ) ? $ return [ 'objects' ] : [ ] , 'class' => $ reflection -> getShortName ( ) , ] ; unset ( $ methodInfo [ 'return' ] [ 'objects' ] ) ; $ this -> setRequestParams ( $ method , $ methodInfo , $ modelNamespace , $ docComments ) ; $ this -> setQueryParams ( $ method , $ methodInfo ) ; $ this -> setRequestHeaders ( $ reflection , $ methodInfo ) ; } catch ( \ Exception $ e ) { Logger :: log ( $ e -> getMessage ( ) , LOG_ERR ) ; } } } return $ methodInfo ; }
Method that extract all the needed info for each method in each API

@param string $namespace
@param \ReflectionMethod $method
@param \ReflectionClass $reflection
@param string $module

@return array
Method that extract all the needed info for each method in each API