[ Index ] |
|
Code source de phpMyVisites 2.3 |
[Code source] [Imprimer] [Statistiques]
XML_Serializer Creates XML documents from PHP data structures like arrays, objects or scalars.
Author: | Stephan Schmidt <schst@php.net> |
Copyright: | 1997-2005 The PHP Group |
License: | http://www.php.net/license/3_0.txt PHP License 3.0 |
Version: | CVS: $Id: Serializer.php,v 1.1 2005/12/06 01:50:39 matthieu_ Exp $ |
Poids: | 945 lignes (36 kb) |
Inclus ou requis: | 2 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
XML_Serializer:: (11 méthodes):
XML_Serializer()
apiVersion()
resetOptions()
setOption()
setOptions()
serialize()
getSerializedData()
_serializeValue()
_serializeArray()
_serializeObject()
_createXMLTag()
Classe: XML_Serializer - X-Ref
Creates XML documents from PHP data structures like arrays, objects or scalars.XML_Serializer( $options = null ) X-Ref |
constructor param: mixed $options array containing options for the serialization |
apiVersion() X-Ref |
return API version return: string $version API version |
resetOptions() X-Ref |
reset all options to default options |
setOption($name, $value) X-Ref |
set an option You can use this method if you do not want to set all options in the constructor |
setOptions($options) X-Ref |
sets several options at once You can use this method if you do not want to set all options in the constructor |
serialize($data, $options = null) X-Ref |
serialize data param: mixed $data data to serialize return: boolean true on success, pear error on failure |
getSerializedData() X-Ref |
get the result of the serialization return: string serialized XML |
_serializeValue($value, $tagName = null, $attributes = array() X-Ref |
serialize any value This method checks for the type of the value and calls the appropriate method param: mixed $value param: string $tagName param: array $attributes return: string |
_serializeArray(&$array, $tagName = null, $attributes = array() X-Ref |
serialize an array param: array $array array to serialize param: string $tagName name of the root tag param: array $attributes attributes for the root tag return: string $string serialized data |
_serializeObject(&$object, $tagName = null, $attributes = array() X-Ref |
serialize an object param: object $object object to serialize return: string $string serialized data |
_createXMLTag( $tag, $firstCall = true ) X-Ref |
create a tag from an array this method awaits an array in the following format array( 'qname' => $tagName, 'attributes' => array(), 'content' => $content, // optional 'namespace' => $namespace // optional 'namespaceUri' => $namespaceUri // optional ) param: array $tag tag definition param: boolean $replaceEntities whether to replace XML entities in content or not return: string $string XML tag |
Généré le : Mon Nov 26 14:10:01 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |