public function PurgeHandlerDrupal::execute in Purge 7.2
Function to execute items from a queue.
Parameters
array $purges:
array $handler_options:
Return value
array $purges
File
- includes/
purge.class.inc, line 509 - Contains all class and interface definitions for Purge.
Class
- PurgeHandlerDrupal
- Class definition for the Drupal HTTP request handler.
Code
public function execute($purges, $handler_options) {
foreach ($purges as $purge_id => $purge) {
$options = array(
'headers' => $purge['headers'],
'method' => $handler_options['method'],
);
$results = drupal_http_request($purge['purge_url'], $options);
$purges[$purge_id]['http_code'] = 200;
// $results['code'];
}
return $purges;
}