Purl\Url::setUrl PHP Method

setUrl() public method

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
ファイル: UrlTest.php プロジェクト: jwage/purl
 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());
 }