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

        foreach (parse_url($url) as $part => $value) {
            $this[$part] = $value;
        }
    }
public function setUrl($url)
    {
        $this->reset();

        foreach (parse_url($url) as $part => $value) {
            $this[$part] = $value;
        }
    }
public function setUrl ( $ url ) { $ this -> reset ( ) ; foreach ( parse_url ( $ url ) as $ part => $ value ) { $ this [ $ part ] = $ value ; } }
Set and parse the url.

@param string $url
@return void
Set and parse the url .