src/Common/Internal/Atom/Content.php
public function fromXml(\SimpleXMLElement $contentXml)
    {
        Validate::notNull($contentXml, 'contentXml');

        $attributes = $contentXml->attributes();

        if (!empty($attributes['type'])) {
            $this->type = (string) $attributes['type'];
        }

        $text = '';
        /** @var \SimpleXMLElement $child */
        foreach ($contentXml->children() as $child) {
            $text .= $child->asXML();
        }

        $this->text = $text;

        $this->xml = $contentXml;
    }
public function fromXml(\SimpleXMLElement $contentXml)
    {
        Validate::notNull($contentXml, 'contentXml');

        $attributes = $contentXml->attributes();

        if (!empty($attributes['type'])) {
            $this->type = (string) $attributes['type'];
        }

        $text = '';
        /** @var \SimpleXMLElement $child */
        foreach ($contentXml->children() as $child) {
            $text .= $child->asXML();
        }

        $this->text = $text;

        $this->xml = $contentXml;
    }
public function fromXml ( \ SimpleXMLElement $ contentXml ) { Validate :: notNull ( $ contentXml , 'contentXml' ) ; $ attributes = $ contentXml -> attributes ( ) ; if ( ! empty ( $ attributes [ 'type' ] ) ) { $ this -> type = ( string ) $ attributes [ 'type' ] ; } $ text = '' ; /** @var \SimpleXMLElement $child */ foreach ( $ contentXml -> children ( ) as $ child ) { $ text .= $ child -> asXML ( ) ; } $ this -> text = $ text ; $ this -> xml = $ contentXml ; }
Creates an ATOM CONTENT instance with specified simpleXML object.

@param \SimpleXMLElement $contentXml xml element of ATOM CONTENT
Creates an ATOM CONTENT instance with specified simpleXML object .