public function setURL($url)
    {
        if (!$this->validateURL($url)) {
            throw new \InvalidArgumentException(sprintf('The URL "%s" is invalid.', $url));
        }

        $this->url = $url;
        $this->endpoint = null;
    }
public function setURL($url)
    {
        if (!$this->validateURL($url)) {
            throw new \InvalidArgumentException(sprintf('The URL "%s" is invalid.', $url));
        }

        $this->url = $url;
        $this->endpoint = null;
    }
public function setURL ( $ url ) { if ( ! $ this -> validateURL ( $ url ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The URL "%s" is invalid.' , $ url ) ) ; } $ this -> url = $ url ; $ this -> endpoint = null ; }
Set a URL to fetch from

@param string $url The URL to fetch from

@throws \InvalidArgumentException If the URL is invalid
Set a URL to fetch from