public function replace($path)
    {
        //argument 1 must be a string
        Argument::i()->test(1, 'string');

        //get the path array
        $pathArray = $this->getArray();

        //pop out the last
        array_pop($pathArray);

        //push in the new
        $pathArray[] = $path;

        //assign back to path
        $this->data = implode('/', $pathArray);

        return $this;
    }
public function replace($path)
    {
        //argument 1 must be a string
        Argument::i()->test(1, 'string');

        //get the path array
        $pathArray = $this->getArray();

        //pop out the last
        array_pop($pathArray);

        //push in the new
        $pathArray[] = $path;

        //assign back to path
        $this->data = implode('/', $pathArray);

        return $this;
    }
public function replace ( $ path ) { //argument 1 must be a string Argument :: i ( ) -> test ( 1 , 'string' ) ; //get the path array $ pathArray = $ this -> getArray ( ) ; //pop out the last array_pop ( $ pathArray ) ; //push in the new $ pathArray [ ] = $ path ; //assign back to path $ this -> data = implode ( '/' , $ pathArray ) ; return $ this ; }
Replaces the last path with this one

@param *string $path replaces the last path with this

@return Eden\Path\Index
Replaces the last path with this one