abstract class PurgeTarget in Purge 7.2
Abstract Class definition for Purge Targets.
Targets are the destination of the purge requests. Typically a reverse proxy server or an API endpoint.
Hierarchy
- class \Purge
- class \PurgeTarget implements PurgeValidateable
Expanded class hierarchy of PurgeTarget
File
- includes/
purge.class.inc, line 282 - Contains all class and interface definitions for Purge.
View source
abstract class PurgeTarget extends Purge implements PurgeValidateable {
public $urls = array();
/**
* Validate
*
* @return $errors
*/
public function validate() {
$errors = array();
// Validate the URLs
foreach ($this->urls as $url) {
if (!valid_url($url, TRUE)) {
$url = check_plain($url);
$errors[] = array(
'name' => 'urls',
'message' => t('Target URL @url in target @name is an invalid target URL.', array(
'@url' => $url,
'@name' => $this->name,
)),
);
}
}
return $errors;
}
}
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 | Only serialize the static values. | 1 |
PurgeTarget:: |
public | property | ||
PurgeTarget:: |
public | function |
Validate Overrides Purge:: |