public function PurgePurgerBundle::__wakeup in Purge 7.2
Set the item objects linked in this bundle when waking up.
File
- includes/
purge.class.inc, line 775 - Contains all class and interface definitions for Purge.
Class
- PurgePurgerBundle
- Class definition for basic bundles.
Code
public function __wakeup() {
// Each item in the item array.
foreach ($this->item as $type_name => $items) {
foreach ($this->{$type_name} as $bundle_item_name => $bundle_item) {
// Check if the item contains items.
if (isset($this->{$type_name}[$bundle_item_name]->item)) {
foreach ($this->{$type_name}[$bundle_item_name]->item as $item_type => $item_names) {
foreach ($item_names as $item_name) {
// Set the item to the bundle item.
// dprint_r($this->{$type_name}[$bundle_item_name]->{$item_type});
// if$this->{$type_name}[$bundle_item_name]->{$item_type} = array();
$this->{$type_name}[$bundle_item_name]->{$item_type}[$item_name] = $this->{$item_type}[$item_name];
}
}
}
}
}
}