src/POData/Writers/Atom/AtomODataWriter.php
/**
     * Function to create link element with arguments.
     * 
     * @param ODataLink $link      Link object to make link element
     * @param Boolean   $isExpanded Is link expanded or not.
     * 
     * @return AtomODataWriter
     */
Function to create link element with arguments.

@param ODataLink $link      Link object to make link element
@param Boolean   $isExpanded Is link expanded or not.


Function to create link element with arguments . @param ODataLink $link Link object to make link element @param Boolean $isExpanded Is link expanded or not .
protected function writeLinkNode(ODataLink $link, $isExpanded)
    {
        $this->xmlWriter->startElement(ODataConstants::ATOM_LINK_ELEMENT_NAME);
        $this->xmlWriter->writeAttribute(
            ODataConstants::ATOM_LINK_RELATION_ATTRIBUTE_NAME,
            $link->name
        );
        if ($link->type != null) {
            $this->xmlWriter->writeAttribute(
                ODataConstants::ATOM_TYPE_ATTRIBUTE_NAME, 
                $link->type
            );
        }
        if ($link->title != null) {
            $this->xmlWriter->writeAttribute(
                ODataConstants::ATOM_TITLE_ELELMET_NAME, 
                $link->title
            );
        }
        $this->xmlWriter->writeAttribute(
            ODataConstants::ATOM_HREF_ATTRIBUTE_NAME, 
            $link->url
        );
        if (!$isExpanded) {
            $this->xmlWriter->endElement();
        }
	    return $this;
    }
protected function writeLinkNode ( ODataLink $ link , $ isExpanded ) { $ this -> xmlWriter -> startElement ( ODataConstants :: ATOM_LINK_ELEMENT_NAME ) ; $ this -> xmlWriter -> writeAttribute ( ODataConstants :: ATOM_LINK_RELATION_ATTRIBUTE_NAME , $ link -> name ) ; if ( $ link -> type != null ) { $ this -> xmlWriter -> writeAttribute ( ODataConstants :: ATOM_TYPE_ATTRIBUTE_NAME , $ link -> type ) ; } if ( $ link -> title != null ) { $ this -> xmlWriter -> writeAttribute ( ODataConstants :: ATOM_TITLE_ELELMET_NAME , $ link -> title ) ; } $ this -> xmlWriter -> writeAttribute ( ODataConstants :: ATOM_HREF_ATTRIBUTE_NAME , $ link -> url ) ; if ( ! $ isExpanded ) { $ this -> xmlWriter -> endElement ( ) ; } return $ this ; }
Function to create link element with arguments.
Function to create link element with arguments .