eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\AuthorConverter::restoreValueFromXmlString PHP Method

restoreValueFromXmlString() private method

Restores an author Value object from $xmlString.
private restoreValueFromXmlString ( string $xmlString ) : Value
$xmlString string XML String stored in storage engine
return eZ\Publish\Core\FieldType\Author\Value
    private function restoreValueFromXmlString($xmlString)
    {
        $dom = new DOMDocument('1.0', 'utf-8');
        $authors = array();
        if ($dom->loadXML($xmlString) === true) {
            foreach ($dom->getElementsByTagName('author') as $author) {
                $authors[] = array('id' => $author->getAttribute('id'), 'name' => $author->getAttribute('name'), 'email' => $author->getAttribute('email'));
            }
        }
        return $authors;
    }