Overview

Packages

  • Serialize

Classes

  • Horde_Serialize
  • Horde_Serialize_Exception
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Serialize

The Serialize:: class provides various methods of encapsulating data.

Copyright 2001-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Package: Serialize
Category: Horde
Author: Stephane Huther shuther1@free.fr
Author: Michael Slusarz slusarz@horde.org
Located at Horde/Serialize.php
Methods summary
public static string
# serialize( mixed $data, mixed $mode = array(self::BASIC), mixed $params = null )

Serialize a value.

Serialize a value.

See the list of constants at the top of the file for the serializing techniques that can be used.

Parameters

$data
The data to be serialized.
$mode
<p>The mode of serialization. Can be either a single mode or array of modes. If array, will be serialized in the order provided.</p>
$params
<p>Any additional parameters the serialization method requires.</p>

Returns

string
The serialized data.

Throws

Horde_Serialize_Exception
public static string
# unserialize( mixed $data, mixed $mode = Horde_Serialize::BASIC, mixed $params = null )

Unserialize a value.

Unserialize a value.

See the list of constants at the top of the file for the serializing techniques that can be used.

Parameters

$data
The data to be unserialized.
$mode
<p>The mode of unserialization. Can be either a single mode or array of modes. If array, will be unserialized in the order provided.</p>
$params
<p>Any additional parameters the unserialization method requires.</p>

Returns

string
The unserialized data.

Throws

Horde_Serialize_Exception
public static boolean
# hasCapability( integer $mode )

Check whether or not a serialization method is supported.

Check whether or not a serialization method is supported.

Parameters

$mode
The serialization method.

Returns

boolean
True if supported, false if not.
Constants summary
integer UNKNOWN
# -1
integer NONE
# 0
integer WDDX
# 1
integer BZIP
# 2
integer IMAP8
# 3
integer IMAPUTF7
# 4
integer IMAPUTF8
# 5
integer BASIC
# 6
integer GZ_DEFLATE
# 7
integer GZ_COMPRESS
# 8
integer GZ_ENCODE
# 9
integer BASE64
# 10
integer RAW
# 12
integer URL
# 13
integer UTF7
# 14
integer UTF7_BASIC
# 15
integer JSON
# 16
integer LZF
# 17
API documentation generated by ApiGen