Adamgoose\Routing\Annotations\AnnotationSet::getMethodAnnotations PHP Method

getMethodAnnotations() protected method

Get the method annotations for a given class.
protected getMethodAnnotations ( ReflectionClass $class, Doctrine\Common\Annotations\SimpleAnnotationReader $reader ) : array
$class ReflectionClass
$reader Doctrine\Common\Annotations\SimpleAnnotationReader
return array
    protected function getMethodAnnotations(ReflectionClass $class, SimpleAnnotationReader $reader)
    {
        $annotations = [];
        foreach ($class->getMethods() as $method) {
            $results = $reader->getMethodAnnotations($method);
            if (count($results) > 0) {
                $annotations[$method->name] = $results;
            }
        }
        return $annotations;
    }