getMatchedEndpoint() public method

public getMatchedEndpoint ( ) : ApiEndpoint | null
return PhalconRest\Api\ApiEndpoint | null The matched endpoint
 public function beforeExecuteRoute(Event $event, Api $api)
 {
     $collection = $api->getMatchedCollection();
     $endpoint = $api->getMatchedEndpoint();
     if (!$collection || !$endpoint) {
         return;
     }
     $allowed = $this->acl->isAllowed($this->userService->getRole(), $collection->getIdentifier(), $endpoint->getIdentifier());
     if (!$allowed) {
         throw new Exception(ErrorCodes::ACCESS_DENIED);
     }
 }