public function setPath($path = null)
    {
        if (is_string($path)) {
            if ($path{0} !== '/') {
                $path = "/$path";
            }
        }
        else if (!is_null($path)) {
            throw new \InvalidArgumentException(
                "invalid value provided for 'path'; ".
                " expecting a string or null"
            );
        }
        $this->path = $path;
    }
public function setPath($path = null)
    {
        if (is_string($path)) {
            if ($path{0} !== '/') {
                $path = "/$path";
            }
        }
        else if (!is_null($path)) {
            throw new \InvalidArgumentException(
                "invalid value provided for 'path'; ".
                " expecting a string or null"
            );
        }
        $this->path = $path;
    }
public function setPath ( $ path = null ) { if ( is_string ( $ path ) ) { if ( $ path { 0 } !== '/' ) { $ path = "/$path" ; } } else if ( ! is_null ( $ path ) ) { throw new \ InvalidArgumentException ( "invalid value provided for 'path'; " . " expecting a string or null" ) ; } $ this -> path = $ path ; }
Set the path portion of the url

@return string|null
Set the path portion of the url