private function PasswordPolicy::getItems in Password Policy 7.2
Gets all items of a particular type.
Parameters
string $type: Item type.
Return value
PasswordPolicyItem[] Items.
4 calls to PasswordPolicy::getItems()
- PasswordPolicy::activeConstraints in includes/
PasswordPolicy.inc - Returns all constraints that are active.
- PasswordPolicy::cron in includes/
PasswordPolicy.inc - Runs cron for each of the items that is a cron item.
- PasswordPolicy::init in includes/
PasswordPolicy.inc - Runs init for each of the items that is a cron item.
- PasswordPolicy::match in includes/
PasswordPolicy.inc - Returns whether all active conditions match.
File
- includes/
PasswordPolicy.inc, line 227 - Contains PasswordPolicy.
Class
- PasswordPolicy
- Defines a class used for managing Password Policies.
Code
private function getItems($type) {
$this->cache[$type] = isset($this->cache[$type]) ? $this->cache[$type] : array();
if (empty($this->cache[$type])) {
foreach ($this->items as $item) {
if ($item
->isType($type)) {
$this->cache[$type][] = $item;
}
}
}
return $this->cache[$type];
}