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

addEndpoint() protected method

Create a new endpoint in the collection.
protected addEndpoint ( EndpointCollection $endpoints, ReflectionClass $class, string $method, array $annotations ) : void
$endpoints EndpointCollection
$class ReflectionClass
$method string
$annotations array
return void
    protected function addEndpoint(EndpointCollection $endpoints, ReflectionClass $class, $method, array $annotations)
    {
        $endpoints->push($endpoint = new MethodEndpoint(['reflection' => $class, 'method' => $method, 'uses' => $class->name . '@' . $method]));
        foreach ($annotations as $annotation) {
            $annotation->modify($endpoint, $class->getMethod($method));
        }
    }