You are here

class Constraint in Password Policy 5

Hierarchy

Expanded class hierarchy of Constraint

1 string reference to 'Constraint'
PasswordPolicyTest::testConstraints in tests/password_policy.test

File

constraints/constraint.php, line 3

View source
class Constraint {
  var $name;
  var $description;
  var $minimumConstraintValue;
  function Constraint($minimumConstraintValue = 0) {
    $this->name = str_replace('_', ' ', ucfirst(strtolower(get_class($this))));
    $this->minimumConstraintValue = $minimumConstraintValue;
  }
  function validate($plaintext_password, $user = NULL) {
    return TRUE;
  }
  function getName() {
    return $this->name;
  }
  function setName($name) {
    $this->name = $name;
  }
  function getValidationErrorMessage($plaintext_password = NULL, $user = NULL) {
    return '';
  }
  function getMinimumConstraintValue() {
    return $this->minimumConstraintValue;
  }
  function getDescription() {
    return $this->description;
  }
  function setDescription($description) {
    $this->description = $description;
  }

}

Members