class PurgePurgerBundleExample in Purge 7.2
Class definition for the Example Bundle. Provides a set of examples for various uses.
Hierarchy
- class \Purge
- class \PurgePurger
- class \PurgePurgerBundle
- class \PurgePurgerBundleExample
- class \PurgePurgerBundle
- class \PurgePurger
Expanded class hierarchy of PurgePurgerBundleExample
File
- includes/
defaults.inc, line 236 - Provides default configuration and handlers or the Purge module.
View source
class PurgePurgerBundleExample extends PurgePurgerBundle {
/**
* Constructor.
*/
public function __construct() {
// Targets
// The localhost target
$this->target['localhost'] = new PurgeTargetStatic();
$this->target['localhost']->name = t('Localhost');
$this->target['localhost']->description = t('The default localhost ip address.');
$this->target['localhost']->access = array(
PURGE_ACCESS_FULL,
);
$this->target['localhost']->urls = array(
'http://127.0.0.1',
);
// Domains
// Get the current domain from the domain object.
$item_domain_drupal = new PurgeDomainDrupal();
$item_domain_drupal
->cache();
$this->domain['current_domain'] = new PurgeDomainStatic();
$this->domain['current_domain']->name = t('Current Domain');
$this->domain['current_domain']->description = t('Use the current domain as an example domain.');
$this->domain['current_domain']->domains = $item_domain_drupal->domains[0];
// Headers
// Purgers
// Now create the purger objects
$this->purger['minimal_purger'] = new PurgePurgerUrl();
$this->purger['minimal_purger']->name = t('Minimal Purger');
$this->purger['minimal_purger']->description = t('Uses Drupal native methods to issue the requests.');
$this->purger['minimal_purger']->item = array(
'option' => array(
'method' => 'PURGE',
),
'depend' => array(),
'target' => array(
'drupal_url',
),
'header' => array(
'gzip',
),
'queue' => array(
'fake',
),
'handler' => array(
'drupal_http_request',
),
);
$this->purger['default_purger'] = new PurgePurgerUrl();
$this->purger['default_purger']->name = t('Default Purger');
$this->purger['default_purger']->description = t('Uses common settings used for a Varnish setup.');
$this->purger['default_purger']->item = array(
'option' => array(
'method' => 'PURGE',
'parallel' => 1,
),
'depend' => array(),
'target' => array(
'drupal_url',
'localhost',
),
'domain' => array(
'drupal_domain',
),
'header' => array(
'gzip',
),
'queue' => array(
'fake',
),
'handler' => array(
'curl',
),
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | property | ||
Purge:: |
public | function | Does basic dependency checks for builtin dependencies. | 5 |
PurgePurger:: |
public | property | ||
PurgePurger:: |
public | property | ||
PurgePurger:: |
public | property | ||
PurgePurger:: |
public | property | ||
PurgePurger:: |
public | property | ||
PurgePurgerBundle:: |
public | property | ||
PurgePurgerBundle:: |
public | function | Function to select data from the dataset. | |
PurgePurgerBundle:: |
public | function | Function to set the type objects. | |
PurgePurgerBundle:: |
public | function |
Override for parents sleep to make sure we include the bundled objects. Overrides Purge:: |
|
PurgePurgerBundle:: |
public | function | Set the item objects linked in this bundle when waking up. | |
PurgePurgerBundleExample:: |
public | function | Constructor. |