Adamgoose\Routing\Annotations\Scanner::getEndpointsInClass PHP Method

getEndpointsInClass() protected method

Build the Endpoints for the given class.
protected getEndpointsInClass ( ReflectionClass $class, AnnotationSet $annotations ) : EndpointCollection
$class ReflectionClass
$annotations AnnotationSet
return EndpointCollection
    protected function getEndpointsInClass(ReflectionClass $class, AnnotationSet $annotations)
    {
        $endpoints = new EndpointCollection();
        foreach ($annotations->method as $method => $methodAnnotations) {
            $this->addEndpoint($endpoints, $class, $method, $methodAnnotations);
        }
        foreach ($annotations->class as $annotation) {
            $annotation->modifyCollection($endpoints, $class);
        }
        return $endpoints;
    }