Horde_Kolab_Format_Decorator_Timed
extends Horde_Kolab_Format_Decorator_Base
in package
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.
Tags
Table of Contents
- $_handler : Horde_Kolab_Format
- The decorated Kolab format handler.
- $_logger : mixed
- An optional logger.
- $_spent : float
- Time spent handling objects.
- $_timer : Horde_Support_Timer
- The timer used for recording the amount of time spent.
- __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.
- timeSpent() : float
- Report the time spent for loading/saving objects.
Properties
$_handler
The decorated Kolab format handler.
private
Horde_Kolab_Format
$_handler
$_logger
An optional logger.
private
mixed
$_logger
$_spent
Time spent handling objects.
private
static float
$_spent
= 0.0
$_timer
The timer used for recording the amount of time spent.
private
Horde_Support_Timer
$_timer
Methods
__construct()
Constructor.
public
__construct(Horde_Kolab_Format $handler, Horde_Support_Timer $timer[, mixed $logger = null ]) : mixed
Parameters
- $handler : Horde_Kolab_Format
-
The handler to be decorated.
- $timer : Horde_Support_Timer
-
The timer.
- $logger : mixed = null
-
The optional logger. If set this needs to provide a debug() method.
Return values
mixed —getHandler()
Return the decorated handler.
public
getHandler() : Horde_Kolab_Format
Return values
Horde_Kolab_Format —The handler.
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
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
Return values
resource —The data as XML stream.
timeSpent()
Report the time spent for loading/saving objects.
public
timeSpent() : float
Return values
float —The amount of time.