api/MarkLogic/MLPHP/AbstractConstraint.php
protected function addFragmentScope($dom, $elem)
    {
        if (!empty($this->fragmentScope)) {
            $fragScopeElem = $dom->createElement('fragment-scope');
            $fragScopeElem->nodeValue = $this->fragmentScope;
            $elem->appendChild($fragScopeElem);
        }
        return $elem;
    }
protected function addFragmentScope($dom, $elem)
    {
        if (!empty($this->fragmentScope)) {
            $fragScopeElem = $dom->createElement('fragment-scope');
            $fragScopeElem->nodeValue = $this->fragmentScope;
            $elem->appendChild($fragScopeElem);
        }
        return $elem;
    }
Add a fragment-scope setting to an element.

@param DOMDocument $dom A DOM document.
@param DOMElement $elem A DOM element.
@return DOMElement The updated element.