src/POData/Writers/Atom/AtomODataWriter.php
/**
     * Begin write odata links
     * 
     * @param ODataUrlCollection $urls Object of ODataUrlCollection to start writing collection of url.
     *
     * 
     * @return AtomODataWriter
     */
Begin write odata links

@param ODataUrlCollection $urls Object of ODataUrlCollection to start writing collection of url.


Begin write odata links @param ODataUrlCollection $urls Object of ODataUrlCollection to start writing collection of url .
public function writeUrlCollection(ODataURLCollection $urls)
    {
        $this->xmlWriter->startElement(ODataConstants::ATOM_LINKS_ELEMENT_NAME);
        $this->xmlWriter->writeAttribute(
            ODataConstants::XMLNS_NAMESPACE_PREFIX, ODataConstants::ODATA_NAMESPACE
        );
        $this->xmlWriter->endAttribute();
        if ($urls->count != null) {
            $this->xmlWriter->writeAttributeNs(
                ODataConstants::XMLNS_NAMESPACE_PREFIX,
                ODataConstants::ODATA_METADATA_NAMESPACE_PREFIX,
                null, 
                ODataConstants::ODATA_METADATA_NAMESPACE
            );
            $this->xmlWriter->endAttribute();
            $this->xmlWriter->startElementNs(
                ODataConstants::ODATA_METADATA_NAMESPACE_PREFIX,
                ODataConstants::ROWCOUNT_ELEMENT,
                null
            );
            $this->xmlWriter->text($urls->count);
            $this->xmlWriter->endElement();
        }
        foreach ($urls->urls as $url) {
            $this->writeNodeValue(ODataConstants::ATOM_URI_ELEMENT_NAME, $url->url);
        }
	    if ($urls->nextPageLink!=null) {
		    $this->writeLinkNode($urls->nextPageLink, false);
	    }
	    $this->xmlWriter->endElement();
	    return $this;
    }
public function writeUrlCollection ( ODataURLCollection $ urls ) { $ this -> xmlWriter -> startElement ( ODataConstants :: ATOM_LINKS_ELEMENT_NAME ) ; $ this -> xmlWriter -> writeAttribute ( ODataConstants :: XMLNS_NAMESPACE_PREFIX , ODataConstants :: ODATA_NAMESPACE ) ; $ this -> xmlWriter -> endAttribute ( ) ; if ( $ urls -> count != null ) { $ this -> xmlWriter -> writeAttributeNs ( ODataConstants :: XMLNS_NAMESPACE_PREFIX , ODataConstants :: ODATA_METADATA_NAMESPACE_PREFIX , null , ODataConstants :: ODATA_METADATA_NAMESPACE ) ; $ this -> xmlWriter -> endAttribute ( ) ; $ this -> xmlWriter -> startElementNs ( ODataConstants :: ODATA_METADATA_NAMESPACE_PREFIX , ODataConstants :: ROWCOUNT_ELEMENT , null ) ; $ this -> xmlWriter -> text ( $ urls -> count ) ; $ this -> xmlWriter -> endElement ( ) ; } foreach ( $ urls -> urls as $ url ) { $ this -> writeNodeValue ( ODataConstants :: ATOM_URI_ELEMENT_NAME , $ url -> url ) ; } if ( $ urls -> nextPageLink != null ) { $ this -> writeLinkNode ( $ urls -> nextPageLink , false ) ; } $ this -> xmlWriter -> endElement ( ) ; return $ this ; }
Begin write odata links
Begin write odata links