wCMF
3.6
|
Public Member Functions | |
PersistentIterator ($oid) | |
save () | |
& | load ($uid) |
& | proceed () |
getCurrentOID () | |
getCurrentDepth () | |
isEnd () | |
reset ($oid) | |
addToSeenList ($oidList, $depth) | |
dumpOIDList () | |
Public Attributes | |
$_end | |
$_oidList | |
$_allList | |
$_currentOID | |
$_currentDepth | |
PersistentIterator is used to iterate over a tree/list build of oids using a Depth-First-Algorithm. To persist its state use the PersistentIterator::save() method, to restore its state use the static PersistentIterator::load() method, which returns the loaded instance. States are identified by an unique id, which is provided after saving. PersistentIterator implements the 'Iterator Pattern'.
wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
Definition at line 33 of file class.PersistentIterator.php.
PersistentIterator::PersistentIterator | ( | $oid | ) |
Constructor.
oid | The oid to start from. |
Definition at line 44 of file class.PersistentIterator.php.
Referenced by load().
PersistentIterator::save | ( | ) |
Save the iterator state to the session
Definition at line 56 of file class.PersistentIterator.php.
References SessionData\getInstance().
& PersistentIterator::load | ( | $uid | ) |
Load an iterator state from the session
uid | The unique id returned from the save method, see PersistentIterator::save() |
Definition at line 72 of file class.PersistentIterator.php.
References SessionData\getInstance(), and PersistentIterator().
Referenced by CopyController\copyNodes(), XMLExportController\exportNodes(), and BatchDisplayController\loadNodes().
& PersistentIterator::proceed | ( | ) |
Proceed to next oid.
Definition at line 92 of file class.PersistentIterator.php.
References addToSeenList(), BUILDDEPTH_SINGLE, and PersistenceFacade\getInstance().
PersistentIterator::getCurrentOID | ( | ) |
Get the current oid.
Definition at line 112 of file class.PersistentIterator.php.
References $_currentOID.
PersistentIterator::getCurrentDepth | ( | ) |
Get the current depth.
Definition at line 120 of file class.PersistentIterator.php.
References $_currentDepth.
PersistentIterator::isEnd | ( | ) |
Find out whether iteration is finished.
Definition at line 128 of file class.PersistentIterator.php.
References $_end.
PersistentIterator::reset | ( | $oid | ) |
Reset the iterator to given oid.
oid | The oid of the object to start from. |
Definition at line 136 of file class.PersistentIterator.php.
PersistentIterator::addToSeenList | ( | $oidList, | |
$depth | |||
) |
Add oids to the internal processed oid list.
oidList | An array of oids. |
depth | The depth of the oids in the tree. |
Definition at line 150 of file class.PersistentIterator.php.
Referenced by proceed().
PersistentIterator::dumpOIDList | ( | ) |
Definition at line 162 of file class.PersistentIterator.php.
PersistentIterator::$_end |
Definition at line 35 of file class.PersistentIterator.php.
Referenced by isEnd().
PersistentIterator::$_oidList |
Definition at line 36 of file class.PersistentIterator.php.
PersistentIterator::$_allList |
Definition at line 37 of file class.PersistentIterator.php.
PersistentIterator::$_currentOID |
Definition at line 38 of file class.PersistentIterator.php.
Referenced by getCurrentOID().
PersistentIterator::$_currentDepth |
Definition at line 39 of file class.PersistentIterator.php.
Referenced by getCurrentDepth().