You are here

public function PurgePurgerBundleProcess::process in Purge 7.2

Process all requests.

File

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

Class

PurgePurgerBundleProcess
Class definition for the runtime bundle. This class is used for processing the purge requests during runtine.

Code

public function process() {

  // Walk the purgeables.
  foreach ($this->purgeables as $purgeable_type_name => $purgeables) {
    foreach ($purgeables as $purgeable) {

      // Pass all purgers.
      foreach ($this->purger as $purger_name => $purger) {

        // Handle purgeable URLs.
        if ($purgeable_type_name == 'urls') {
          if ($this->purger[$purger_name] instanceof PurgeProcessableUrl) {

            // Process the Purgeable URL.
            $this->purger[$purger_name]
              ->process_url($purgeable);
          }
        }
      }
    }
  }

  // Now process the queues.
  foreach ($this->queue as $queue) {

    //if (count($queue->queue) > 0) {
    $queue
      ->process();

    // }
  }
}