Class XML_Unserializer

Description

XML_Unserializer

class to unserialize XML documents that have been created with XML_Serializer. To unserialize an XML document you have to add type hints to the XML_Serializer options.

If no type hints are available, XML_Unserializer will guess how the tags should be treated, that means complex structures will be arrays and tags with only CData in them will be strings.

Located in /PEAR/XML/Unserializer.php (line 253)

PEAR
   |
   --XML_Unserializer
Variable Summary
 array $options
Method Summary
 XML_Unserializer XML_Unserializer ([mixed $options = null])
 string apiVersion ()
 string getRootName ()
 void resetOptions ()
 void setOption (mixed $name, mixed $value)
 void setOptions (mixed $options)
 boolean unserialize (mixed $data, [boolean $isFile = false], [array $options = null])
Variables
array $options = array() (line 316)

current options for the serialization

  • access: public
Methods
Constructor XML_Unserializer (line 372)

constructor

  • access: public
XML_Unserializer XML_Unserializer ([mixed $options = null])
  • mixed $options: array containing options for the unserialization
apiVersion (line 388)

return API version

  • return: API version
  • static:
  • access: public
string apiVersion ()
getRootName (line 515)

get the name of the root tag

  • access: public
string getRootName ()
getUnserializedData (line 501)

get the result of the serialization

  • access: public
string getUnserializedData ()
resetOptions (line 399)

reset all options to default options

void resetOptions ()
setOption (line 412)

set an option

You can use this method if you do not want to set all options in the constructor

void setOption (mixed $name, mixed $value)
setOptions (line 425)

sets several options at once

You can use this method if you do not want to set all options in the constructor

void setOptions (mixed $options)
unserialize (line 439)

unserialize data

  • access: public
boolean unserialize (mixed $data, [boolean $isFile = false], [array $options = null])
  • mixed $data: data to unserialize (string, filename or resource)
  • boolean $isFile: data should be treated as a file
  • array $options: options that will override the global options for this call

Inherited Methods

Inherited From PEAR

 PEAR::PEAR()
 PEAR::delExpect()
 PEAR::expectError()
 PEAR::getStaticProperty()
 PEAR::isError()
 PEAR::loadExtension()
 PEAR::popErrorHandling()
 PEAR::popExpect()
 PEAR::pushErrorHandling()
 PEAR::raiseError()
 PEAR::registerShutdownFunc()
 PEAR::setErrorHandling()
 PEAR::staticPopErrorHandling()
 PEAR::staticPushErrorHandling()
 PEAR::throwError()
 PEAR::_PEAR()

Documentation generated on Mon, 04 Dec 2006 11:10:16 -0500 by phpDocumentor 1.3.0RC3