public static function delete($key, array $options = array())
{
$defaults = array('name' => null, 'strategies' => true);
$options += $defaults;
$methods = array();
if ($name = $options['name']) {
$methods = array($name => static::adapter($name)->delete($key, $options));
} else {
foreach (static::$_configurations as $name => $config) {
if ($method = static::adapter($name)->delete($key, $options)) {
$methods[$name] = $method;
}
}
}
$result = false;
$options += array('key' => $key, 'class' => __CLASS__);
$original = $key;
foreach ($methods as $name => $method) {
$settings = static::_config($name);
if ($options['strategies']) {
$options += array('key' => $key, 'class' => __CLASS__);
$key = static::applyStrategies(__FUNCTION__, $name, $original, $options);
}
$params = compact('key', 'options');
$filters = $settings['filters'];
$result = static::_filter(__FUNCTION__, $params, $method, $filters) || $result;
}
return $result;
}