Purl\Url::setPath PHP Method

setPath() public method

Set the Path instance.
public setPath ( purl\Path $path )
$path purl\Path
    public function setPath(Path $path)
    {
        $this->data['path'] = $path;
        return $this;
    }

Usage Example

Example #1
0
 public function testIdeGettersAndSetters()
 {
     $url = new Url('http://jwage.com');
     $url->setPath(new Path('about'));
     $url->setQuery(new Query('param=value'));
     $url->setFragment(new Fragment(new Path('about'), new Query('param=value')));
     $this->assertEquals('http://jwage.com/about?param=value#about?param=value', (string) $url);
 }