Public Member Functions | |
addHandler ($intPosition, $cloHandler) | |
deleteHandler ($intPosition) | |
execute (array $arrParameter) | |
getClone () | |
getState () | |
Private Attributes | |
$arrHandlerQueue = array() | |
$objState = null | |
this class implements a queue of handler, which are called in a specified order.
this allows the combiniation of different steps, like database-connection management, query execution and result parsing in a simple list of actions.
Queue::getClone() returns a clone of the queue, which allows modifications of the queue by the executed handler. in this way different problems, like substituions, test-cases, statistics and much more can be solved, without destroying the configured order for other queries.
Definition at line 21 of file Queue.class.php.
DDDBL\Queue::addHandler | ( | $intPosition, | |
$cloHandler | |||
) |
$intPosition | - the position to store the handler at |
$cloHandler | - the handler to store in the queue |
UnexpectedParameterTypeException | - if the first parameter is not an integer |
UnexpectedParameterTypeException | - if the second parameter is not a callable |
\Exception | - if there is already a handler stored under the given position |
store the given handler under the given position in the queue. if the position is already in use an expection is thrown.
Definition at line 49 of file Queue.class.php.
DDDBL\Queue::deleteHandler | ( | $intPosition | ) |
$intPosition | - the position the handler for deletion is stored under |
UnexpectedParameterTypeException | - if the parameter is not an integer |
delete the handler stored under the given position
Definition at line 74 of file Queue.class.php.
DDDBL\Queue::execute | ( | array | $arrParameter | ) |
$arrParameter | - the parameter to use when executing the queue-handler |
execute all handler in the queue, in the given order from low to high. after execution return the state "result".
handler which generates an output are expected to store the result in this state
Definition at line 109 of file Queue.class.php.
DDDBL\Queue::getClone | ( | ) |
return a clone of the acutal queue
Definition at line 90 of file Queue.class.php.
DDDBL\Queue::getState | ( | ) |
returns a reference to the DataObject, which stores all states of the queue.
if no object exists till now, a new one is created
Definition at line 129 of file Queue.class.php.
|
private |
the sorted (!) queue of handler to execute
Definition at line 27 of file Queue.class.php.
|
private |
an DataObject, which is used to store the states of the queue
Definition at line 35 of file Queue.class.php.