public function parse(array $classes)
    {
        $APIAnnotations = [];
        foreach ($classes as $class) {
            $reflectionClass = new \ReflectionClass($class);

            foreach ($reflectionClass->getMethods() as $reflectionMethod) {
                $annotations = $this->getReader()->getMethodAnnotations($reflectionMethod);
                if (!empty($annotations)) {
                    foreach ($annotations as $annotation) {

                        switch (true) {

                            case ($annotation instanceof Route):
                                $APIAnnotations[$class][$reflectionMethod->getName()]['routes'][] = $annotation;
                                break;

                            case ($annotation instanceof ResponseBody):
                                $APIAnnotations[$class][$reflectionMethod->getName()]['requestBody'][] = $annotation;
                                break;

                            case ($annotation instanceof RequestBody):
                                $APIAnnotations[$class][$reflectionMethod->getName()]['responseBody'][] = $annotation;
                                break;

                            default:
                                // Do nothing
                        }
                    }
                }
            }
        }

        return $APIAnnotations;
    }
public function parse(array $classes)
    {
        $APIAnnotations = [];
        foreach ($classes as $class) {
            $reflectionClass = new \ReflectionClass($class);

            foreach ($reflectionClass->getMethods() as $reflectionMethod) {
                $annotations = $this->getReader()->getMethodAnnotations($reflectionMethod);
                if (!empty($annotations)) {
                    foreach ($annotations as $annotation) {

                        switch (true) {

                            case ($annotation instanceof Route):
                                $APIAnnotations[$class][$reflectionMethod->getName()]['routes'][] = $annotation;
                                break;

                            case ($annotation instanceof ResponseBody):
                                $APIAnnotations[$class][$reflectionMethod->getName()]['requestBody'][] = $annotation;
                                break;

                            case ($annotation instanceof RequestBody):
                                $APIAnnotations[$class][$reflectionMethod->getName()]['responseBody'][] = $annotation;
                                break;

                            default:
                                // Do nothing
                        }
                    }
                }
            }
        }

        return $APIAnnotations;
    }
public function parse ( array $ classes ) { $ APIAnnotations = [ ] ; foreach ( $ classes as $ class ) { $ reflectionClass = new \ ReflectionClass ( $ class ) ; foreach ( $ reflectionClass -> getMethods ( ) as $ reflectionMethod ) { $ annotations = $ this -> getReader ( ) -> getMethodAnnotations ( $ reflectionMethod ) ; if ( ! empty ( $ annotations ) ) { foreach ( $ annotations as $ annotation ) { switch ( true ) { case ( $ annotation instanceof Route ) : $ APIAnnotations [ $ class ] [ $ reflectionMethod -> getName ( ) ] [ 'routes' ] [ ] = $ annotation ; break ; case ( $ annotation instanceof ResponseBody ) : $ APIAnnotations [ $ class ] [ $ reflectionMethod -> getName ( ) ] [ 'requestBody' ] [ ] = $ annotation ; break ; case ( $ annotation instanceof RequestBody ) : $ APIAnnotations [ $ class ] [ $ reflectionMethod -> getName ( ) ] [ 'responseBody' ] [ ] = $ annotation ; break ; default : // Do nothing } } } } } return $ APIAnnotations ; }
Parses the files provided by the SeekableIterator

@param array $classes Array of classes to parse

@return array
Parses the files provided by the SeekableIterator