public function isSamePrimaryResource(Uri $uri)
    {
        if (!$this->isAbsolute() || !$uri->isAbsolute()) {
            throw new \LogicException('Cannot compare URIs: both must be absolute');
        }

        return $this->primaryIdentifier === $uri->getPrimaryResourceIdentifier();
    }
public function isSamePrimaryResource(Uri $uri)
    {
        if (!$this->isAbsolute() || !$uri->isAbsolute()) {
            throw new \LogicException('Cannot compare URIs: both must be absolute');
        }

        return $this->primaryIdentifier === $uri->getPrimaryResourceIdentifier();
    }
public function isSamePrimaryResource ( Uri $ uri ) { if ( ! $ this -> isAbsolute ( ) || ! $ uri -> isAbsolute ( ) ) { throw new \ LogicException ( 'Cannot compare URIs: both must be absolute' ) ; } return $ this -> primaryIdentifier === $ uri -> getPrimaryResourceIdentifier ( ) ; }
Returns whether two URIs share the same primary resource identifier,
i.e. whether they point to the same document.

@param Uri $uri

@return bool
Returns whether two URIs share the same primary resource identifier i . e . whether they point to the same document .