\Horde_Kolab_Format_Decorator_Timed

Determines how much time is spent while loading/saving the Kolab objects.

Copyright 2010-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()
timeSpent()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$_handler
$_timer
$_logger
$_spent
N/A

Properties

$_handler

$_handler : \Horde_Kolab_Format

The decorated Kolab format handler.

Type

\Horde_Kolab_Format

$_timer

$_timer : \Horde_Support_Timer

The timer used for recording the amount of time spent.

Type

\Horde_Support_Timer

$_logger

$_logger : mixed

An optional logger.

Type

mixed

$_spent

$_spent : float

Time spent handling objects.

Type

float

Methods

__construct()

__construct(\Horde_Kolab_Format  $handler, \Horde_Support_Timer  $timer, mixed  $logger = null) 

Constructor.

Parameters

\Horde_Kolab_Format $handler

The handler to be decorated.

\Horde_Support_Timer $timer

The timer.

mixed $logger

The optional logger. If set this needs to 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.

timeSpent()

timeSpent() : float

Report the time spent for loading/saving objects.

Returns

float —

The amount of time.