UriSequence.php
function joint(iUriSequence $pathUri)
    {
        $muchLength = $this->getPath();
        $less       = $pathUri->getPath();

        if ( count($less) > count($muchLength) ) {
            $muchLength = $less;
            $less = $this->getPath();
        }

        $similar = array(); // empty path
        foreach($muchLength as $i => $v) {
            if (!array_key_exists($i, $less) || $v != $less[$i])
                break;

            $similar[] = $v;
        }

        $path = clone $this;
        $path->setPath($similar);
        return $path;
    }
function joint(iUriSequence $pathUri)
    {
        $muchLength = $this->getPath();
        $less       = $pathUri->getPath();

        if ( count($less) > count($muchLength) ) {
            $muchLength = $less;
            $less = $this->getPath();
        }

        $similar = array(); // empty path
        foreach($muchLength as $i => $v) {
            if (!array_key_exists($i, $less) || $v != $less[$i])
                break;

            $similar[] = $v;
        }

        $path = clone $this;
        $path->setPath($similar);
        return $path;
    }
function joint ( iUriSequence $ pathUri ) { $ muchLength = $ this -> getPath ( ) ; $ less = $ pathUri -> getPath ( ) ; if ( count ( $ less ) > count ( $ muchLength ) ) { $ muchLength = $ less ; $ less = $ this -> getPath ( ) ; } $ similar = array ( ) ; // empty path foreach ( $ muchLength as $ i => $ v ) { if ( ! array_key_exists ( $ i , $ less ) || $ v != $ less [ $ i ] ) break ; $ similar [ ] = $ v ; } $ path = clone $ this ; $ path -> setPath ( $ similar ) ; return $ path ; }
Joint Given PathUri with Current Path

/var/www/html <=> /var/www/ ===> /var/www

@param iUriSequence $pathUri

@return iUriSequence
Joint Given PathUri with Current Path