src/Uri.php
protected function setFragment($fragment)
    {
        $this->uriString = null;

        $fragment = ltrim($fragment, '#');

        $this->fragment = static::encode($fragment);

        return $this;
    }
protected function setFragment($fragment)
    {
        $this->uriString = null;

        $fragment = ltrim($fragment, '#');

        $this->fragment = static::encode($fragment);

        return $this;
    }
protected function setFragment ( $ fragment ) { $ this -> uriString = null ; $ fragment = ltrim ( $ fragment , '#' ) ; $ this -> fragment = static :: encode ( $ fragment ) ; return $ this ; }
Sets the provided URI fragment to current instance.

@param type $fragment The URI fragment

@return Uri The current instance with the provided URI fragment
Sets the provided URI fragment to current instance .