You are here

abstract class PurgeDomain in Purge 7.2

Class definition for domains.

Hierarchy

Expanded class hierarchy of PurgeDomain

File

includes/purge.class.inc, line 332
Contains all class and interface definitions for Purge.

View source
abstract class PurgeDomain extends Purge {
  public $domains = array();

  /**
   * Validate the domains.
   */
  public function validate() {
    $errors = array();
    foreach ($this->domains as $domain) {
      $pieces = explode(".", $domain);
      foreach ($pieces as $piece) {
        if (!preg_match('/^[a-z\\d][a-z\\d-]{0,62}$/i', $piece) || preg_match('/-$/', $piece)) {
          $errors[] = array(
            'name' => 'domains',
            'message' => t('Invalid domain'),
          );
        }
        return $errors;
      }
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Purge::$access public property
Purge::$available public property
Purge::$depend public property
Purge::$description public property
Purge::$enabled public property
Purge::$item public property
Purge::$name public property
Purge::$option public property
Purge::__sleep public function Only serialize the static values. 1
PurgeDomain::$domains public property
PurgeDomain::validate public function Validate the domains. Overrides Purge::validate