src/POData/Writers/Atom/AtomODataWriter.php
/**
     * Write the node which hold the entity properties as child
     * 
     * @param ODataEntry $entry ODataEntry object for pre writing properties.
     * 
     * @return AtomODataWriter
     */
Write the node which hold the entity properties as child

@param ODataEntry $entry ODataEntry object for pre writing properties.


Write the node which hold the entity properties as child @param ODataEntry $entry ODataEntry object for pre writing properties .
public function preWriteProperties(ODataEntry $entry)
    {
        $this->xmlWriter->startElement(ODataConstants::ATOM_CATEGORY_ELEMENT_NAME);
        $this->xmlWriter->writeAttribute(
            ODataConstants::ATOM_CATEGORY_TERM_ATTRIBUTE_NAME, 
            $entry->type
        );
        $this->xmlWriter->writeAttribute(
            ODataConstants::ATOM_CATEGORY_SCHEME_ATTRIBUTE_NAME,
            ODataConstants::ODATA_SCHEME_NAMESPACE
        );
        $this->xmlWriter->endElement();
        $this->xmlWriter->startElement(ODataConstants::ATOM_CONTENT_ELEMENT_NAME);
        if ($entry->isMediaLinkEntry) {
            $this->xmlWriter->writeAttribute(
                ODataConstants::ATOM_TYPE_ATTRIBUTE_NAME,
                $entry->mediaLink->contentType
            );
            $this->xmlWriter->writeAttribute(
                ODataConstants::ATOM_CONTENT_SRC_ATTRIBUTE_NAME,
                $entry->mediaLink->srcLink
            );
            $this->xmlWriter->endElement();
            $this->xmlWriter->startElementNS(
                ODataConstants::ODATA_METADATA_NAMESPACE_PREFIX,
                ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME, null
            );
        } else {
            $this->xmlWriter->writeAttribute(
                ODataConstants::ATOM_TYPE_ATTRIBUTE_NAME,
	            MimeTypes::MIME_APPLICATION_XML
            );
            $this->xmlWriter->startElementNS(
                ODataConstants::ODATA_METADATA_NAMESPACE_PREFIX,
                ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME,
                null
            );
        }
	    return $this;
    }
public function preWriteProperties ( ODataEntry $ entry ) { $ this -> xmlWriter -> startElement ( ODataConstants :: ATOM_CATEGORY_ELEMENT_NAME ) ; $ this -> xmlWriter -> writeAttribute ( ODataConstants :: ATOM_CATEGORY_TERM_ATTRIBUTE_NAME , $ entry -> type ) ; $ this -> xmlWriter -> writeAttribute ( ODataConstants :: ATOM_CATEGORY_SCHEME_ATTRIBUTE_NAME , ODataConstants :: ODATA_SCHEME_NAMESPACE ) ; $ this -> xmlWriter -> endElement ( ) ; $ this -> xmlWriter -> startElement ( ODataConstants :: ATOM_CONTENT_ELEMENT_NAME ) ; if ( $ entry -> isMediaLinkEntry ) { $ this -> xmlWriter -> writeAttribute ( ODataConstants :: ATOM_TYPE_ATTRIBUTE_NAME , $ entry -> mediaLink -> contentType ) ; $ this -> xmlWriter -> writeAttribute ( ODataConstants :: ATOM_CONTENT_SRC_ATTRIBUTE_NAME , $ entry -> mediaLink -> srcLink ) ; $ this -> xmlWriter -> endElement ( ) ; $ this -> xmlWriter -> startElementNS ( ODataConstants :: ODATA_METADATA_NAMESPACE_PREFIX , ODataConstants :: ATOM_PROPERTIES_ELEMENT_NAME , null ) ; } else { $ this -> xmlWriter -> writeAttribute ( ODataConstants :: ATOM_TYPE_ATTRIBUTE_NAME , MimeTypes :: MIME_APPLICATION_XML ) ; $ this -> xmlWriter -> startElementNS ( ODataConstants :: ODATA_METADATA_NAMESPACE_PREFIX , ODataConstants :: ATOM_PROPERTIES_ELEMENT_NAME , null ) ; } return $ this ; }
Write the node which hold the entity properties as child
Write the node which hold the entity properties as child