src/SearchEndpoint/SearchEndpointFactory.php
public static function get($type)
    {
        if (!array_key_exists($type, self::$endpoints)) {
            throw new \RuntimeException('Endpoint does not exist.');
        }

        return new self::$endpoints[$type]();
    }
public static function get($type)
    {
        if (!array_key_exists($type, self::$endpoints)) {
            throw new \RuntimeException('Endpoint does not exist.');
        }

        return new self::$endpoints[$type]();
    }
public static function get ( $ type ) { if ( ! array_key_exists ( $ type , self :: $ endpoints ) ) { throw new \ RuntimeException ( 'Endpoint does not exist.' ) ; } return new self :: $ endpoints [ $ type ] ( ) ; }
Returns a search endpoint instance.

@param string $type Type of endpoint.

@return SearchEndpointInterface

@throws \RuntimeException Endpoint does not exist.
Returns a search endpoint instance .