src/Common/Internal/Atom/Source.php
public function writeInnerXml(\XMLWriter $xmlWriter)
    {
        Validate::notNull($xmlWriter, 'xmlWriter');
        if (!is_null($this->attributes)) {
            if (is_array($this->attributes)) {
                foreach ($this->attributes as $attributeName => $attributeValue) {
                    $xmlWriter->writeAttribute($attributeName, $attributeValue);
                }
            }
        }

        if (!is_null($this->author)) {
            Validate::isArray($this->author, Resources::AUTHOR);
            $this->writeArrayItem($xmlWriter, $this->author, Resources::AUTHOR);
        }

        if (!is_null($this->category)) {
            Validate::isArray($this->category, Resources::CATEGORY);
            $this->writeArrayItem(
                $xmlWriter,
                $this->category,
                Resources::CATEGORY
            );
        }

        if (!is_null($this->contributor)) {
            Validate::isArray($this->contributor, Resources::CONTRIBUTOR);
            $this->writeArrayItem(
                $xmlWriter,
                $this->contributor,
                Resources::CONTRIBUTOR
            );
        }

        if (!is_null($this->generator)) {
            $this->generator->writeXml($xmlWriter);
        }

        if (!is_null($this->icon)) {
            $xmlWriter->writeElementNS(
                'atom',
                'icon',
                Resources::ATOM_NAMESPACE,
                $this->icon
            );
        }

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'logo',
            Resources::ATOM_NAMESPACE,
            $this->logo
        );

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'id',
            Resources::ATOM_NAMESPACE,
            $this->id
        );

        if (!is_null($this->link)) {
            Validate::isArray($this->link, Resources::LINK);
            $this->writeArrayItem(
                $xmlWriter,
                $this->link,
                Resources::LINK
            );
        }

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'rights',
            Resources::ATOM_NAMESPACE,
            $this->rights
        );

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'subtitle',
            Resources::ATOM_NAMESPACE,
            $this->subtitle
        );

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'title',
            Resources::ATOM_NAMESPACE,
            $this->title
        );

        if (!is_null($this->updated)) {
            $xmlWriter->writeElementNS(
                'atom',
                'updated',
                Resources::ATOM_NAMESPACE,
                $this->updated->format(\DateTime::ATOM)
            );
        }
    }
public function writeInnerXml(\XMLWriter $xmlWriter)
    {
        Validate::notNull($xmlWriter, 'xmlWriter');
        if (!is_null($this->attributes)) {
            if (is_array($this->attributes)) {
                foreach ($this->attributes as $attributeName => $attributeValue) {
                    $xmlWriter->writeAttribute($attributeName, $attributeValue);
                }
            }
        }

        if (!is_null($this->author)) {
            Validate::isArray($this->author, Resources::AUTHOR);
            $this->writeArrayItem($xmlWriter, $this->author, Resources::AUTHOR);
        }

        if (!is_null($this->category)) {
            Validate::isArray($this->category, Resources::CATEGORY);
            $this->writeArrayItem(
                $xmlWriter,
                $this->category,
                Resources::CATEGORY
            );
        }

        if (!is_null($this->contributor)) {
            Validate::isArray($this->contributor, Resources::CONTRIBUTOR);
            $this->writeArrayItem(
                $xmlWriter,
                $this->contributor,
                Resources::CONTRIBUTOR
            );
        }

        if (!is_null($this->generator)) {
            $this->generator->writeXml($xmlWriter);
        }

        if (!is_null($this->icon)) {
            $xmlWriter->writeElementNS(
                'atom',
                'icon',
                Resources::ATOM_NAMESPACE,
                $this->icon
            );
        }

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'logo',
            Resources::ATOM_NAMESPACE,
            $this->logo
        );

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'id',
            Resources::ATOM_NAMESPACE,
            $this->id
        );

        if (!is_null($this->link)) {
            Validate::isArray($this->link, Resources::LINK);
            $this->writeArrayItem(
                $xmlWriter,
                $this->link,
                Resources::LINK
            );
        }

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'rights',
            Resources::ATOM_NAMESPACE,
            $this->rights
        );

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'subtitle',
            Resources::ATOM_NAMESPACE,
            $this->subtitle
        );

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'title',
            Resources::ATOM_NAMESPACE,
            $this->title
        );

        if (!is_null($this->updated)) {
            $xmlWriter->writeElementNS(
                'atom',
                'updated',
                Resources::ATOM_NAMESPACE,
                $this->updated->format(\DateTime::ATOM)
            );
        }
    }
public function writeInnerXml ( \ XMLWriter $ xmlWriter ) { Validate :: notNull ( $ xmlWriter , 'xmlWriter' ) ; if ( ! is_null ( $ this -> attributes ) ) { if ( is_array ( $ this -> attributes ) ) { foreach ( $ this -> attributes as $ attributeName => $ attributeValue ) { $ xmlWriter -> writeAttribute ( $ attributeName , $ attributeValue ) ; } } } if ( ! is_null ( $ this -> author ) ) { Validate :: isArray ( $ this -> author , Resources :: AUTHOR ) ; $ this -> writeArrayItem ( $ xmlWriter , $ this -> author , Resources :: AUTHOR ) ; } if ( ! is_null ( $ this -> category ) ) { Validate :: isArray ( $ this -> category , Resources :: CATEGORY ) ; $ this -> writeArrayItem ( $ xmlWriter , $ this -> category , Resources :: CATEGORY ) ; } if ( ! is_null ( $ this -> contributor ) ) { Validate :: isArray ( $ this -> contributor , Resources :: CONTRIBUTOR ) ; $ this -> writeArrayItem ( $ xmlWriter , $ this -> contributor , Resources :: CONTRIBUTOR ) ; } if ( ! is_null ( $ this -> generator ) ) { $ this -> generator -> writeXml ( $ xmlWriter ) ; } if ( ! is_null ( $ this -> icon ) ) { $ xmlWriter -> writeElementNS ( 'atom' , 'icon' , Resources :: ATOM_NAMESPACE , $ this -> icon ) ; } $ this -> writeOptionalElementNS ( $ xmlWriter , 'atom' , 'logo' , Resources :: ATOM_NAMESPACE , $ this -> logo ) ; $ this -> writeOptionalElementNS ( $ xmlWriter , 'atom' , 'id' , Resources :: ATOM_NAMESPACE , $ this -> id ) ; if ( ! is_null ( $ this -> link ) ) { Validate :: isArray ( $ this -> link , Resources :: LINK ) ; $ this -> writeArrayItem ( $ xmlWriter , $ this -> link , Resources :: LINK ) ; } $ this -> writeOptionalElementNS ( $ xmlWriter , 'atom' , 'rights' , Resources :: ATOM_NAMESPACE , $ this -> rights ) ; $ this -> writeOptionalElementNS ( $ xmlWriter , 'atom' , 'subtitle' , Resources :: ATOM_NAMESPACE , $ this -> subtitle ) ; $ this -> writeOptionalElementNS ( $ xmlWriter , 'atom' , 'title' , Resources :: ATOM_NAMESPACE , $ this -> title ) ; if ( ! is_null ( $ this -> updated ) ) { $ xmlWriter -> writeElementNS ( 'atom' , 'updated' , Resources :: ATOM_NAMESPACE , $ this -> updated -> format ( \ DateTime :: ATOM ) ) ; } }
Writes a inner XML representing the source object.

@param \XMLWriter $xmlWriter The XML writer
Writes a inner XML representing the source object .