XML_Serializer
[ class tree: XML_Serializer ] [ index: XML_Serializer ] [ all elements ]

Class: XML_Unserializer

Source Location: /XML_Serializer-0.20.2/XML/Unserializer.php

Class Overview

PEAR
   |
   --XML_Unserializer

XML_Unserializer


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2003-2008 Stephan Schmidt <schst@php.net>

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 276]
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.

  1.  require_once 'XML/Unserializer.php';
  2.  
  3.  //  be careful to always use the ampersand in front of the new operator
  4.  $unserializer &new XML_Unserializer();
  5.  
  6.  $unserializer->unserialize($xml);
  7.  
  8.  $data $unserializer->getUnserializedData();



[ Top ]


Class Variables

$options = array()

[line 378]

current options for the serialization
  • Access: public

Type:   array


[ Top ]



Method Detail

XML_Unserializer (Constructor)   [line 435]

XML_Unserializer XML_Unserializer( [mixed $options = null])

constructor
  • Access: public

Parameters:

mixed   $options   —  array containing options for the unserialization

[ Top ]

apiVersion   [line 451]

string apiVersion( )

return API version
  • Return: API version
  • Access: public

[ Top ]

getRootName   [line 594]

string getRootName( )

get the name of the root tag
  • Access: public

[ Top ]

getUnserializedData   [line 578]

string getUnserializedData( )

get the result of the serialization
  • Access: public

[ Top ]

resetOptions   [line 463]

void resetOptions( )

reset all options to default options

[ Top ]

setOption   [line 481]

void setOption( string $name, mixed $value)

set an option

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


Parameters:

string   $name   —  name of option
mixed   $value   —  value of option

[ Top ]

setOptions   [line 498]

void setOptions( array $options)

sets several options at once

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


Parameters:

array   $options   —  options array

[ Top ]

unserialize   [line 514]

boolean unserialize( mixed $data, [boolean $isFile = false], [array $options = null])

unserialize data
  • Access: public

Parameters:

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:41:41 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.