public function PurgePurgerBundleAPI::validate in Purge 7.2
Validates the bundle.
Return value
array $errors
Overrides Purge::validate
File
- includes/
purge.class.inc, line 885 - Contains all class and interface definitions for Purge.
Class
- PurgePurgerBundleAPI
- Provides a full bundle.
Code
public function validate() {
$errors = array();
foreach ($this->type as $type_name => $type) {
foreach ($this->{$type_name} as $item) {
if ($item instanceof PurgeValidateable) {
$item_errors = $item
->validate();
if (count($item_errors) > 0) {
foreach ($item_errors as $item_error) {
$errors[] = $item_error;
}
}
}
}
}
return $errors;
}