protected function findEndpointFromProviders($url)
    {
        // try to find a provider matching the supplied URL if no one has been supplied
        foreach ($this->providers as $provider) {
            /** @var $provider Provider */
            if ($provider->match($url)) {
                return $provider->getEndpoint();
            }
        }

        return null;
    }