api/MarkLogic/MLPHP/CollectionConstraint.php
public function getAsElem($dom)
    {
        $constElem = $dom->createElement('constraint');
        $constElem->setAttribute('name', $this->name);
        $collElem = $dom->createElement('collection');
        $collElem->setAttribute('prefix', $this->prefix);
        $this->addTermOptions($dom, $collElem);
        $this->addFacetOptions($dom, $collElem);
        $constElem->appendChild($collElem);
        /* <constraint name='contributor'>
                <collection prefix='http://bbq.com/contributor/'/>
       </constraint> */
        return $constElem;
    }
public function getAsElem($dom)
    {
        $constElem = $dom->createElement('constraint');
        $constElem->setAttribute('name', $this->name);
        $collElem = $dom->createElement('collection');
        $collElem->setAttribute('prefix', $this->prefix);
        $this->addTermOptions($dom, $collElem);
        $this->addFacetOptions($dom, $collElem);
        $constElem->appendChild($collElem);
        /* <constraint name='contributor'>
                <collection prefix='http://bbq.com/contributor/'/>
       </constraint> */
        return $constElem;
    }
Get the constraint as a DOMElement object.

@param DOMDocument $dom The DOMDocument object with which to create the element.