Purl\Url::setUrl PHP Метод

setUrl() публичный Метод

Set the string url for this Url instance and sets initialized to false.
public setUrl ( $url )
    public function setUrl($url)
    {
        $this->initialized = false;
        $this->data = array();
        $this->url = $url;
    }

Usage Example

Пример #1
0
 public function testSetUrl()
 {
     $url = new Url('http://jwage.com');
     $this->assertEquals('http://jwage.com/', $url->getUrl());
     $url->setUrl('http://google.com');
     $this->assertEquals('http://google.com/', $url->getUrl());
 }