Commit abd01318 by Frederick d. Maus

mcPUIX

1 parent bfe40597
Showing with 33 additions and 0 deletions
......@@ -123,5 +123,37 @@ class mcPUIX extends mcClass {
}
}
protected static $Tables = array ();
public function walk_ListElements(Account &$param_HostAccount, iStorable &$param_iStorable, $param_tablename, array $param_callbackfncForList=null, array $param_callbackfncForListElements=null) {
if(mcArray::checkKeyHasFullArray($this->DBTab, $param_tablename, mcPUIX::DBUIArray, mcPUIX::PDOValues) ) {
$callbackfncForList = false;
if(is_array($param_callbackfncForList) && !empty ($param_callbackfncForList)) {
$callbackfncForList = true;
}
$callbackfncForListElements = false;
if(is_array($param_callbackfncForListElements) && !empty ($param_callbackfncForListElements)) {
$callbackfncForListElements = true;
}
foreach($this->DBTab[$param_tablename][mcPUIX::DBUIArray][mcPUIX::PDOValues] as &$ListData) {
if($callbackfncForList) {
foreach($param_callbackfncForList as $fncForList) {
$this->$fncForList($param_HostAccount, $param_iStorable, $ListData);
}
}
foreach($ListData as &$ListElement) {
if($callbackfncForListElements && mcArray::checkKeyHasFullArray($ListElement, mcPUIX::PDOValues)) {
foreach($ListElement[mcPUIX::PDOValues] as $ListElementData) {
foreach($param_callbackfncForListElements as $fncForElements) {
$this->$fncForElements($param_HostAccount, $param_iStorable, $ListData, $ListElementData);
}
}
}
}
}
}
}
}
?>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!