src/Common/Internal/Atom/Category.php
public function parseXml($xmlString)
    {
        Validate::notNull($xmlString, 'xmlString');
        Validate::isString($xmlString, 'xmlString');
        $categoryXml = simplexml_load_string($xmlString);
        $attributes = $categoryXml->attributes();
        if (!empty($attributes['term'])) {
            $this->term = (string) $attributes['term'];
        }

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

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

        $this->undefinedContent = (string) $categoryXml;
    }
public function parseXml($xmlString)
    {
        Validate::notNull($xmlString, 'xmlString');
        Validate::isString($xmlString, 'xmlString');
        $categoryXml = simplexml_load_string($xmlString);
        $attributes = $categoryXml->attributes();
        if (!empty($attributes['term'])) {
            $this->term = (string) $attributes['term'];
        }

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

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

        $this->undefinedContent = (string) $categoryXml;
    }
public function parseXml ( $ xmlString ) { Validate :: notNull ( $ xmlString , 'xmlString' ) ; Validate :: isString ( $ xmlString , 'xmlString' ) ; $ categoryXml = simplexml_load_string ( $ xmlString ) ; $ attributes = $ categoryXml -> attributes ( ) ; if ( ! empty ( $ attributes [ 'term' ] ) ) { $ this -> term = ( string ) $ attributes [ 'term' ] ; } if ( ! empty ( $ attributes [ 'scheme' ] ) ) { $ this -> scheme = ( string ) $ attributes [ 'scheme' ] ; } if ( ! empty ( $ attributes [ 'label' ] ) ) { $ this -> label = ( string ) $ attributes [ 'label' ] ; } $ this -> undefinedContent = ( string ) $ categoryXml ; }
Creates an ATOM Category instance with specified xml string.

@param string $xmlString an XML based string of ATOM CONTENT
Creates an ATOM Category instance with specified xml string .