Exemplo n.º 1
0
 /**
  *
  * @param ValidatorState $state
  * @return ValidatorState
  */
 private function _calculatePolicyIntersection(ValidatorState $state)
 {
     // (i) If the valid_policy_tree is NULL, the intersection is NULL
     if (!$state->hasValidPolicyTree()) {
         return $state;
     }
     // (ii) If the valid_policy_tree is not NULL and
     // the user-initial-policy-set is any-policy, the intersection
     // is the entire valid_policy_tree
     $initial_policies = $this->_config->policySet();
     if (in_array(PolicyInformation::OID_ANY_POLICY, $initial_policies)) {
         return $state;
     }
     // (iii) If the valid_policy_tree is not NULL and the
     // user-initial-policy-set is not any-policy, calculate
     // the intersection of the valid_policy_tree and the
     // user-initial-policy-set as follows
     return $state->validPolicyTree()->calculateIntersection($state, $initial_policies);
 }