src/BaseProxyConnector.php
public function setEndpoints( array $endpoints = [] ) {
		if ( empty( $endpoints ) ) {
			throw new \Exception( 'Endpoints variable is empty.' );
		}

		foreach ( $endpoints as $endpoint ) {
			// Check if required configurations are set
			foreach ( $this->endpointRequiredKeys as $key ) {
				if ( ! isset( $endpoint[ $key ] ) ) {
					throw new \Exception( 'Endpoint (' . $endpoint . ') is not defined correctly, the config key (' . $key . ') is not defined' );
				}
			}
		}

		$this->endpointsConfig = $endpoints;
	}
public function setEndpoints( array $endpoints = [] ) {
		if ( empty( $endpoints ) ) {
			throw new \Exception( 'Endpoints variable is empty.' );
		}

		foreach ( $endpoints as $endpoint ) {
			// Check if required configurations are set
			foreach ( $this->endpointRequiredKeys as $key ) {
				if ( ! isset( $endpoint[ $key ] ) ) {
					throw new \Exception( 'Endpoint (' . $endpoint . ') is not defined correctly, the config key (' . $key . ') is not defined' );
				}
			}
		}

		$this->endpointsConfig = $endpoints;
	}
Fetch the endpoints from config.

@param array $endpoints

@return array
@throws \Exception