Documentation

Horde_Kolab_Format_Decorator_Memory extends Horde_Kolab_Format_Decorator_Base
in package

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.

Tags
category

Kolab

author

Gunnar Wrobel wrobel@pardus.de

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

link
http://www.horde.org/libraries/Horde_Kolab_Format

Table of Contents

$_handler  : Horde_Kolab_Format
The decorated Kolab format handler.
$_logger  : mixed
An optional logger.
$_memory  : Horde_Support_Memory
The memory tracker used for recording the memory parameters.
__construct()  : mixed
Constructor.
getHandler()  : Horde_Kolab_Format
Return the decorated handler.
load()  : array<string|int, mixed>
Load an object based on the given XML stream.
save()  : resource
Convert the data to a XML stream.
_formatUsage()  : string
Format the memory usage information.

Properties

$_logger

An optional logger.

private mixed $_logger

$_memory

The memory tracker used for recording the memory parameters.

private Horde_Support_Memory $_memory

Methods

__construct()

Constructor.

public __construct(Horde_Kolab_Format $handler, Horde_Support_Memory $memory[, mixed $logger = null ]) : mixed
Parameters
$handler : Horde_Kolab_Format

The handler to be decorated.

$memory : Horde_Support_Memory

The memory tracker.

$logger : mixed = null

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

Return values
mixed

load()

Load an object based on the given XML stream.

public load(resource $xml[, array<string|int, mixed> $options = array() ]) : array<string|int, mixed>
Parameters
$xml : resource

The XML stream of the message.

$options : array<string|int, mixed> = array()

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

Tags
throws
Horde_Kolab_Format_Exception
Return values
array<string|int, mixed>

The data array representing the object.

save()

Convert the data to a XML stream.

public save(array<string|int, mixed> $object[, array<string|int, mixed> $options = array() ]) : resource
Parameters
$object : array<string|int, mixed>

The data array representing the object.

$options : array<string|int, mixed> = array()

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

Tags
throws
Horde_Kolab_Format_Exception
Return values
resource

The data as XML stream.

_formatUsage()

Format the memory usage information.

private _formatUsage(array<string|int, mixed> $usage) : string
Parameters
$usage : array<string|int, mixed>

The memory usage.

Return values
string

The formated memory usage.

Search results