24                assert(
'is_string($acl) || is_array($acl)');
 
   26                if (is_string(
$acl)) {
 
   31                        if (!is_array(
$rule)) {
 
   34                        if (count(
$rule) === 0) {
 
   56                assert(
'is_string($id)');
 
   75                foreach ($this->acl as 
$rule) {
 
  100                $op = array_shift(
$rule);
 
  136                foreach (
$rule as $subRule) {
 
  156                $attributeName = array_shift(
$rule);
 
  158                if (!array_key_exists($attributeName, 
$attributes)) {
 
  159                        $attributeValues = array();
 
  164                foreach (
$rule as $value) {
 
  166                        foreach ($attributeValues as 
$i => $v) {
 
  170                                unset($attributeValues[
$i]);
 
  178                if (!empty($attributeValues)) {
 
  197                $attributeName = array_shift(
$rule);
 
  199                if (!array_key_exists($attributeName, 
$attributes)) {
 
  200                        $attributeValues = array();
 
  205                foreach (
$rule as $pattern) {
 
  207                        foreach ($attributeValues as 
$i => $v) {
 
  208                                if (!preg_match($pattern, $v)) {
 
  211                                unset($attributeValues[
$i]);
 
  220                if (!empty($attributeValues)) {
 
  239                $attributeName = array_shift(
$rule);
 
  241                if (!array_key_exists($attributeName, 
$attributes)) {
 
  242                        $attributeValues = array();
 
  247                foreach (
$rule as $value) {
 
  248                        if (!in_array($value, $attributeValues, TRUE)) {
 
  267                $attributeName = array_shift(
$rule);
 
  269                if (!array_key_exists($attributeName, 
$attributes)) {
 
  270                        $attributeValues = array();
 
  275                foreach (
$rule as $pattern) {
 
  276                        $matches = preg_grep($pattern, $attributeValues);
 
  277                        if (count($matches) === 0) {
 
  296                foreach (
$rule as $subRule) {
 
An exception for terminatinating execution or to throw for unit testing.
static getOptionalConfig($filename='config.php', $configSet='simplesaml')
Load a configuration file from a configuration set.
static opEqualsPreg($attributes, $rule)
'equals-preg' match operator.
static getById($id)
Retrieve an access control list with the given id.
static opHas($attributes, $rule)
'has' match operator.
__construct($acl)
Initializer for this access control list.
allows(array $attributes)
Match the attributes against the access control list.
static match(array $attributes, array $rule)
Match the attributes against the given rule.
static opEquals($attributes, $rule)
'equals' match operator.
static opAnd($attributes, $rule)
'and' match operator.
static opHasPreg($attributes, $rule)
'has-preg' match operator.
static opOr($attributes, $rule)
'or' match operator.
if(!array_key_exists('StateId', $_REQUEST)) $id