protected function getEndpointHandler($apiName, ReflectionClass $endpointReflector) {
        if(isset($this->endpointObjectCache[$apiName])) {
            return $this->endpointObjectCache[$apiName];
        }

        //Create a new instance and store it
        $endpointInstance = $endpointReflector->newInstanceArgs([$this->getClient()]);
        $this->endpointObjectCache[$apiName] = $endpointInstance;

        return $endpointInstance;
    }
protected function getEndpointHandler($apiName, ReflectionClass $endpointReflector) {
        if(isset($this->endpointObjectCache[$apiName])) {
            return $this->endpointObjectCache[$apiName];
        }

        //Create a new instance and store it
        $endpointInstance = $endpointReflector->newInstanceArgs([$this->getClient()]);
        $this->endpointObjectCache[$apiName] = $endpointInstance;

        return $endpointInstance;
    }
protected function getEndpointHandler ( $ apiName , ReflectionClass $ endpointReflector ) { if ( isset ( $ this -> endpointObjectCache [ $ apiName ] ) ) { return $ this -> endpointObjectCache [ $ apiName ] ; } //Create a new instance and store it $ endpointInstance = $ endpointReflector -> newInstanceArgs ( [ $ this -> getClient ( ) ] ) ; $ this -> endpointObjectCache [ $ apiName ] = $ endpointInstance ; return $ endpointInstance ; }
Returns a new instance from the given endpoint handler. In the instance creation the client is
passed to tha handler as parameter.

This method also do runtime caching. All endpoint handler cached by name

@param string $apiName Used as cache key name
@param \ReflectionClass $endpointReflector

@return \Phabricator\Endpoints\EndpointInterface
Returns a new instance from the given endpoint handler . In the instance creation the client is passed to tha handler as parameter .