You are here

public function PurgePurgerBundleQueue::__construct in Purge 7.2

Constructs the bundle from queue items and executes the purges.

Parameters

array $queue_items:

File

includes/purge.class.inc, line 1024
Contains all class and interface definitions for Purge.

Class

PurgePurgerBundleQueue
Executes queued purges.

Code

public function __construct($queue_items) {

  // Get the raw data from the variable (or cache at a later stage).
  $all_data = $this
    ->get_data();

  // Figure out which handlers we'll need for these purges.
  foreach ($queue_items as $queue_item) {
    $handler_name = $queue_item['handler'];
    if (!isset($this->handler[$handler_name])) {

      // Create the object from the serialized data.
      $this->handler[$handler_name] = unserialize($all_data['handler'][$handler_name]);
    }
  }
}