Jackalope\Transport\Jackrabbit\Client::getRequiredDomElementByTagNameNS PHP Method

getRequiredDomElementByTagNameNS() protected method

If the element is not found and $errorMessage is set, then a RepositoryException is thrown. If the element is not found and $errorMessage is empty, then false is returned.
protected getRequiredDomElementByTagNameNS ( DOMNode $dom, string $namespace, string $element, string $errorMessage = '' ) : boolean | DOMNode
$dom DOMNode The DOM element which content should be searched
$namespace string The namespace of the searched element
$element string The name of the searched element
$errorMessage string The error message in case the element is not found
return boolean | DOMNode
    protected function getRequiredDomElementByTagNameNS($dom, $namespace, $element, $errorMessage = '')
    {
        $list = $dom->getElementsByTagNameNS($namespace, $element);
        if (!$list->length) {
            if ($errorMessage) {
                throw new RepositoryException($errorMessage);
            }
            return false;
        }
        return $list->item(0);
    }