public function setFullPath($fullPath) {
        $fullPath = '/'.ltrim($fullPath, '/');

        // Try stripping the root out of the path first.
        $root = (string)$this->getRoot();

        if ($root &&
            strpos($fullPath, $root) === 0 &&
            (strlen($fullPath) === strlen($root) || substr($fullPath, strlen($root), 1) === '/')) {

            $this->setPathExt(substr($fullPath, strlen($root)));
        } else {
            $this->setRoot('');
            $this->setPathExt($fullPath);
        }

        return $this;
    }
public function setFullPath($fullPath) {
        $fullPath = '/'.ltrim($fullPath, '/');

        // Try stripping the root out of the path first.
        $root = (string)$this->getRoot();

        if ($root &&
            strpos($fullPath, $root) === 0 &&
            (strlen($fullPath) === strlen($root) || substr($fullPath, strlen($root), 1) === '/')) {

            $this->setPathExt(substr($fullPath, strlen($root)));
        } else {
            $this->setRoot('');
            $this->setPathExt($fullPath);
        }

        return $this;
    }
public function setFullPath ( $ fullPath ) { $ fullPath = '/' . ltrim ( $ fullPath , '/' ) ; // Try stripping the root out of the path first. $ root = ( string ) $ this -> getRoot ( ) ; if ( $ root && strpos ( $ fullPath , $ root ) === 0 && ( strlen ( $ fullPath ) === strlen ( $ root ) || substr ( $ fullPath , strlen ( $ root ) , 1 ) === '/' ) ) { $ this -> setPathExt ( substr ( $ fullPath , strlen ( $ root ) ) ) ; } else { $ this -> setRoot ( '' ) ; $ this -> setPathExt ( $ fullPath ) ; } return $ this ; }
Set the full path of the request.

The full path consists of the root + path + extension.
This method examins the current root to see if the root can still be used or should be removed.
Special care must be taken when calling this method to make sure you don't remove the root unintentionally.

@param string $fullPath The full path to set.
@return Request Returns $this for fluent calls.
Set the full path of the request .