serialize() public method

Serialize this XML chunk.
public serialize ( ) : string
return string The serialized chunk.
Ejemplo n.º 1
0
 /**
  * Test serialization and unserialization
  */
 public function testChunkSerializationLoop()
 {
     $ser = $this->chunk->serialize();
     $document = DOMDocumentFactory::fromString('<root />');
     $newchunk = new Chunk($document->firstChild);
     $newchunk->unserialize($ser);
     $this->assertEqualXMLStructure($this->chunk->getXML(), $newchunk->getXML());
 }