Doctrine\OXM\Marshaller\Marshaller::unmarshalFromString PHP Method

unmarshalFromString() public method

public unmarshalFromString ( string $xml ) : object
$xml string
return object
    function unmarshalFromString($xml);

Usage Example

コード例 #1
0
 /**
  * @test
  * @dataProvider typeMappingProvider
  */
 public function itShouldProduceExactXmlForAttributeOfType($object, $resultString)
 {
     $xml = $this->marshaller->marshalToString($object);
     $this->assertTrue(strlen($xml) > 0);
     $this->assertXmlStringEqualsXmlString('<?xml version="1.0" encoding="UTF-8"?>' . $resultString, $xml);
     $otherObject = $this->marshaller->unmarshalFromString($xml);
     $this->assertEquals($object->i, $otherObject->i);
     $this->assertEquals($object, $otherObject);
 }
All Usage Examples Of Doctrine\OXM\Marshaller\Marshaller::unmarshalFromString