public function setUrl($url)
    {
        $this->url = $url;

        // Check if the url ends with a slash
        if ($this->url && substr($this->url, -1) !== '/') {
            $this->url .= '/';
        }

        return $this;
    }
public function setUrl($url)
    {
        $this->url = $url;

        // Check if the url ends with a slash
        if ($this->url && substr($this->url, -1) !== '/') {
            $this->url .= '/';
        }

        return $this;
    }
public function setUrl ( $ url ) { $ this -> url = $ url ; // Check if the url ends with a slash if ( $ this -> url && substr ( $ this -> url , - 1 ) !== '/' ) { $ this -> url .= '/' ; } return $ this ; }
Sets the request url.

@param string $url The url.

@return $this The current object.
Sets the request url .