ZF\Apigility\Admin\Model\AuthorizationEntity::filterPrivileges PHP Méthode

filterPrivileges() protected méthode

protected filterPrivileges ( array $privileges )
$privileges array
    protected function filterPrivileges(array $privileges)
    {
        foreach ($privileges as $httpMethod => $flag) {
            if (!array_key_exists($httpMethod, $this->defaultPrivileges)) {
                unset($privileges[$httpMethod]);
                continue;
            }
            if (!is_bool($flag)) {
                $privileges[$httpMethod] = (bool) $flag;
                continue;
            }
        }
        return $privileges;
    }