src/POData/Writers/Atom/AtomODataWriter.php
/**
     * Begin write OData Feed
     * 
     * @param ODataFeed $feed Object of OData feed to start writing feed
     * @param boolean $isTopLevel indicates if this is the top level feed in the response
     * 
     * @return AtomODataWriter
     */
Begin write OData Feed

@param ODataFeed $feed Object of OData feed to start writing feed
@param boolean $isTopLevel indicates if this is the top level feed in the response


Begin write OData Feed @param ODataFeed $feed Object of OData feed to start writing feed @param boolean $isTopLevel indicates if this is the top level feed in the response
protected function writeFeed(ODataFeed $feed, $isTopLevel = false)
    {
        $this->xmlWriter->startElement(ODataConstants::ATOM_FEED_ELEMENT_NAME);
        if ($isTopLevel) {
            $this->writeBaseUriAndDefaultNamespaces();
        }
	    $this
		    ->writeNodeAttributeValue(
			    ODataConstants::ATOM_TITLE_ELELMET_NAME,
			    ODataConstants::ATOM_TYPE_ATTRIBUTE_NAME,
			    MimeTypes::MIME_TEXTTYPE,
			    $feed->title
		    )
		    ->writeNodeValue(ODataConstants::ATOM_ID_ELEMENT_NAME, $feed->id)
		    ->writeNodeValue(ODataConstants::ATOM_UPDATED_ELEMENT_NAME, date(DATE_ATOM) )
		    ->writeLinkNode($feed->selfLink, false);
	    if ($feed->rowCount != null) {
		    $this->xmlWriter->startElementNs(
			    ODataConstants::ODATA_METADATA_NAMESPACE_PREFIX,
			    ODataConstants::ROWCOUNT_ELEMENT, null
		    );
		    $this->xmlWriter->text($feed->rowCount);
		    $this->xmlWriter->endElement();
	    }
	    foreach ($feed->entries as $entry) {
		    $this->writeEntry($entry);
	    }
	    if ($feed->nextPageLink != null) {
		    $this->writeLinkNode($feed->nextPageLink, false);
	    }
	    $this->xmlWriter->endElement();
	    return $this;
    }
protected function writeFeed ( ODataFeed $ feed , $ isTopLevel = false ) { $ this -> xmlWriter -> startElement ( ODataConstants :: ATOM_FEED_ELEMENT_NAME ) ; if ( $ isTopLevel ) { $ this -> writeBaseUriAndDefaultNamespaces ( ) ; } $ this -> writeNodeAttributeValue ( ODataConstants :: ATOM_TITLE_ELELMET_NAME , ODataConstants :: ATOM_TYPE_ATTRIBUTE_NAME , MimeTypes :: MIME_TEXTTYPE , $ feed -> title ) -> writeNodeValue ( ODataConstants :: ATOM_ID_ELEMENT_NAME , $ feed -> id ) -> writeNodeValue ( ODataConstants :: ATOM_UPDATED_ELEMENT_NAME , date ( DATE_ATOM ) ) -> writeLinkNode ( $ feed -> selfLink , false ) ; if ( $ feed -> rowCount != null ) { $ this -> xmlWriter -> startElementNs ( ODataConstants :: ODATA_METADATA_NAMESPACE_PREFIX , ODataConstants :: ROWCOUNT_ELEMENT , null ) ; $ this -> xmlWriter -> text ( $ feed -> rowCount ) ; $ this -> xmlWriter -> endElement ( ) ; } foreach ( $ feed -> entries as $ entry ) { $ this -> writeEntry ( $ entry ) ; } if ( $ feed -> nextPageLink != null ) { $ this -> writeLinkNode ( $ feed -> nextPageLink , false ) ; } $ this -> xmlWriter -> endElement ( ) ; return $ this ; }
Begin write OData Feed
Begin write OData Feed