You are here

function _password_policy_load_constraint_definitions in Password Policy 5

Loads all the constraint object definitions.

5 calls to _password_policy_load_constraint_definitions()
PasswordPolicyTest::testConstraints in tests/password_policy.test
password_policy_form_policy_form_submit in ./password_policy.module
Form submission hook for new or edited password policies.
password_policy_load_active_policy in ./password_policy.module
Loads the default (enabled and active) policy or NULL if there are no active policies.
password_policy_load_policy_by_id in ./password_policy.module
Loads the policy with the specified id or NULL if not found.
_password_policy_get_valid_constraints in ./password_policy.module
Returns an array of constraint instances which the user should be able to have access to in their password policy. Only the ones which the user sets a value for will be used. See password_policy_form_policy_submit().

File

./password_policy.module, line 706

Code

function _password_policy_load_constraint_definitions() {
  $dir = dirname(__FILE__) . '/constraints';
  $constraints = file_scan_directory($dir, '^constraint.*\\.php$');
  foreach ($constraints as $c_file) {
    if (is_file($c_file->filename)) {
      include_once $c_file->filename;
    }
  }
}