protected function samePrefix($url)
    {
        $partsA = explode('/', $url);
        $partsB = explode('/', $this->currentFileName);

        $n = count($partsA);
        if ($n != count($partsB)) {
            return false;
        }

        unset($partsA[$n-1]);
        unset($partsB[$n-1]);

        return $partsA == $partsB;
    }
protected function samePrefix($url)
    {
        $partsA = explode('/', $url);
        $partsB = explode('/', $this->currentFileName);

        $n = count($partsA);
        if ($n != count($partsB)) {
            return false;
        }

        unset($partsA[$n-1]);
        unset($partsB[$n-1]);

        return $partsA == $partsB;
    }
protected function samePrefix ( $ url ) { $ partsA = explode ( '/' , $ url ) ; $ partsB = explode ( '/' , $ this -> currentFileName ) ; $ n = count ( $ partsA ) ; if ( $ n != count ( $ partsB ) ) { return false ; } unset ( $ partsA [ $ n - 1 ] ) ; unset ( $ partsB [ $ n - 1 ] ) ; return $ partsA == $ partsB ; }
Returns true if the given url have the same prefix as the
current document
Returns true if the given url have the same prefix as the current document