public function getEndpoint($name = self::DEFAULT_ENDPOINT): Endpoint
    {
        $endpoints = $this->endpointsConfig;
        unset($endpoints[self::DEFAULT_ENDPOINT]);
        $endpointsNames = array_keys($endpoints);
        if (self::DEFAULT_ENDPOINT !== $name && !\in_array($name, $endpointsNames)) {
            throw new EndpointNotValidException($name, $endpointsNames);
        }

        //use first static cache
        if (isset(self::$endpoints[$name])) {
            return self::$endpoints[$name];
        }

        //use file cache
        self::$endpoints[$name] = $this->loadCache($name);

        //retry after load from file
        if (isset(self::$endpoints[$name]) && self::$endpoints[$name] instanceof Endpoint) {
            return self::$endpoints[$name];
        }

        $this->initialize($name);

        return self::$endpoints[$name];
    }
public function getEndpoint($name = self::DEFAULT_ENDPOINT): Endpoint
    {
        $endpoints = $this->endpointsConfig;
        unset($endpoints[self::DEFAULT_ENDPOINT]);
        $endpointsNames = array_keys($endpoints);
        if (self::DEFAULT_ENDPOINT !== $name && !\in_array($name, $endpointsNames)) {
            throw new EndpointNotValidException($name, $endpointsNames);
        }

        //use first static cache
        if (isset(self::$endpoints[$name])) {
            return self::$endpoints[$name];
        }

        //use file cache
        self::$endpoints[$name] = $this->loadCache($name);

        //retry after load from file
        if (isset(self::$endpoints[$name]) && self::$endpoints[$name] instanceof Endpoint) {
            return self::$endpoints[$name];
        }

        $this->initialize($name);

        return self::$endpoints[$name];
    }
public function getEndpoint ( $ name = self :: DEFAULT_ENDPOINT ) : Endpoint { $ endpoints = $ this -> endpointsConfig ; unset ( $ endpoints [ self :: DEFAULT_ENDPOINT ] ) ; $ endpointsNames = array_keys ( $ endpoints ) ; if ( self :: DEFAULT_ENDPOINT !== $ name && ! \ in_array ( $ name , $ endpointsNames ) ) { throw new EndpointNotValidException ( $ name , $ endpointsNames ) ; } //use first static cache if ( isset ( self :: $ endpoints [ $ name ] ) ) { return self :: $ endpoints [ $ name ] ; } //use file cache self :: $ endpoints [ $ name ] = $ this -> loadCache ( $ name ) ; //retry after load from file if ( isset ( self :: $ endpoints [ $ name ] ) && self :: $ endpoints [ $ name ] instanceof Endpoint ) { return self :: $ endpoints [ $ name ] ; } $ this -> initialize ( $ name ) ; return self :: $ endpoints [ $ name ] ; }
Get endpoint schema

For internal use can get the default endpoint (contains all definitions)
For consumers must get the endpoint for current consumer.

@param string $name

@return Endpoint

@throws EndpointNotValidException
Get endpoint schema