Psecio\PropAuth\Enforcer::denies PHP Method

denies() public method

Locate a policy by name and evaluate if the subject is denied by matching against its properties
public denies ( string $policyName, object $subject, array $addl = [] ) : boolean
$policyName string Policy key name
$subject object Subject to evluate against
$addl array
return boolean Pass/fail of evluation
    public function denies($policyName, $subject, array $addl = array())
    {
        if (!is_array($policyName)) {
            $policyName = [$policyName];
        }
        foreach ($policyName as $name) {
            if (!isset($this->policySet[$name])) {
                throw new \InvalidArgumentException('Policy name "' . $name . '" not found');
            }
            $result = $this->evaluate($subject, $this->policySet[$name], $addl);
            if ($result === true) {
                return false;
            }
        }
        return true;
    }