protected function addUrlToDocument(array $urlArray)
    {
        if ($this->hasMaxUrlCount()) {
            throw new MaxUrlCountExceededException('Maximum number of URLs has been reached, cannot add more.');
        }

        $node = $this->document->createElement($this->getNodeName());

        foreach ($urlArray as $key => $value) {
            if (is_null($value)) {
                continue;
            }
            $node->appendChild(new DOMElement($key, $value));
        }
        $this->rootNode->appendChild($node);
        $this->urlCount++;

        return $this;
    }
protected function addUrlToDocument(array $urlArray)
    {
        if ($this->hasMaxUrlCount()) {
            throw new MaxUrlCountExceededException('Maximum number of URLs has been reached, cannot add more.');
        }

        $node = $this->document->createElement($this->getNodeName());

        foreach ($urlArray as $key => $value) {
            if (is_null($value)) {
                continue;
            }
            $node->appendChild(new DOMElement($key, $value));
        }
        $this->rootNode->appendChild($node);
        $this->urlCount++;

        return $this;
    }
protected function addUrlToDocument ( array $ urlArray ) { if ( $ this -> hasMaxUrlCount ( ) ) { throw new MaxUrlCountExceededException ( 'Maximum number of URLs has been reached, cannot add more.' ) ; } $ node = $ this -> document -> createElement ( $ this -> getNodeName ( ) ) ; foreach ( $ urlArray as $ key => $ value ) { if ( is_null ( $ value ) ) { continue ; } $ node -> appendChild ( new DOMElement ( $ key , $ value ) ) ; } $ this -> rootNode -> appendChild ( $ node ) ; $ this -> urlCount ++ ; return $ this ; }
Adds a URL to the document with the given array of elements.
@param  array $urlArray
@return $this
@throws MaxUrlCountExceededException
Adds a URL to the document with the given array of elements .