Horde_Kolab_Format_Xml::load PHP Méthode

load() public méthode

Load an object based on the given XML stream. The stream may only contain UTF-8 data.
public load ( resource $xml, array $options = [] ) : array
$xml resource The XML stream of the message.
$options array Additional options when parsing the XML.
- relaxed: Relaxed error checking (default: false)
Résultat array The data array representing the object.
    public function load($xml, $options = array())
    {
        $this->_xmldoc = $this->_getParser()->parse($xml, $options);
        $this->_refreshParser();
        $params = $this->_getParameters($options);
        $this->_getRoot($params)->load($this->_root_name, $object, $this->_xmldoc, $this->_factory->createXmlHelper($this->_xmldoc), $params);
        return $object;
    }

Usage Example

Exemple #1
0
 public function testRoundtripWithPreviousOnApiV1()
 {
     $xml = new Horde_Kolab_Format_Xml(new Horde_Kolab_Format_Xml_Parser(new DOMDocument('1.0', 'UTF-8')), new Horde_Kolab_Format_Factory(), array('version' => 1));
     $first = $xml->save(array('uid' => 1));
     $second = $xml->save($xml->load($first));
     $this->assertEquals($this->removeLastModification($first), $this->removeLastModification($second));
 }
All Usage Examples Of Horde_Kolab_Format_Xml::load