\Horde_Kolab_Format_Decorator_Memory

Determines some memory parameters while loading/saving the Kolab objects.

Copyright 2011-2017 Horde LLC (http://www.horde.org/)

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

Summary

Methods
Properties
Constants
__construct()
getHandler()
load()
save()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
_formatUsage()
$_handler
$_memory
$_logger
N/A

Properties

$_handler

$_handler : \Horde_Kolab_Format

The decorated Kolab format handler.

Type

\Horde_Kolab_Format

$_memory

$_memory : \Horde_Support_Memory

The memory tracker used for recording the memory parameters.

Type

\Horde_Support_Memory

$_logger

$_logger : mixed

An optional logger.

Type

mixed

Methods

__construct()

__construct(\Horde_Kolab_Format  $handler, \Horde_Support_Memory  $memory, mixed  $logger = null) 

Constructor.

Parameters

\Horde_Kolab_Format $handler

The handler to be decorated.

\Horde_Support_Memory $memory

The memory tracker.

mixed $logger

The logger. This must provide a debug() method.

getHandler()

getHandler() : \Horde_Kolab_Format

Return the decorated handler.

Returns

\Horde_Kolab_Format

The handler.

load()

load(resource  $xml, array  $options = array()) : array

Load an object based on the given XML stream.

Parameters

resource $xml

The XML stream of the message.

array $options

Additional options when parsing the XML. This decorator provides no additional options.

Throws

\Horde_Kolab_Format_Exception

Returns

array —

The data array representing the object.

save()

save(array  $object, array  $options = array()) : resource

Convert the data to a XML stream.

Parameters

array $object

The data array representing the object.

array $options

Additional options when writing the XML. This decorator provides no additional options.

Throws

\Horde_Kolab_Format_Exception

Returns

resource —

The data as XML stream.

_formatUsage()

_formatUsage(array  $usage) : string

Format the memory usage information.

Parameters

array $usage

The memory usage.

Returns

string —

The formated memory usage.