public function PurgePurgerBundleAPI::__construct in Purge 7.2
Constructs the full bundle.
1 method overrides PurgePurgerBundleAPI::__construct()
- PurgePurgerBundleDefault::__construct in includes/
defaults.inc - Construct the default bundle.
File
- includes/
purge.class.inc, line 833 - Contains all class and interface definitions for Purge.
Class
- PurgePurgerBundleAPI
- Provides a full bundle.
Code
public function __construct() {
// Get the data from the given dataset.
$select_data = $this
->get_data();
// Then get the datastructure of the types up.
foreach ($select_data['type'] as $type_name => $type_data) {
$this->type[$type_name] = unserialize($type_data);
// And create an object for each item
foreach ($select_data[$type_name] as $item_name => $item_data) {
$this->{$type_name}[$item_name] = unserialize($item_data);
}
}
// Purgers need special handling
foreach ($this->purger as $purger_name => $purger) {
// Each type name that is a pointer.
foreach ($purger->pointers as $pointer_type => $item_names) {
$this->purger[$purger_name]->{$pointer_type} = array();
}
}
}