src/Drivers/ArrayDriver.php
public function hasCallerPermission(Caller $caller, Permission $permission)
    {
        // Iterate over each permission from the user and check if the permission is in the array.
        foreach ($this->getCallerPermissions($caller) as $callerPermission) {
            // If a matching permission was found, immediately break the sequence and return true.
            if ($callerPermission->matchesPermission($permission)) {
                return true;
            }
        }

        return false;
    }
public function hasCallerPermission(Caller $caller, Permission $permission)
    {
        // Iterate over each permission from the user and check if the permission is in the array.
        foreach ($this->getCallerPermissions($caller) as $callerPermission) {
            // If a matching permission was found, immediately break the sequence and return true.
            if ($callerPermission->matchesPermission($permission)) {
                return true;
            }
        }

        return false;
    }
public function hasCallerPermission ( Caller $ caller , Permission $ permission ) { // Iterate over each permission from the user and check if the permission is in the array. foreach ( $ this -> getCallerPermissions ( $ caller ) as $ callerPermission ) { // If a matching permission was found, immediately break the sequence and return true. if ( $ callerPermission -> matchesPermission ( $ permission ) ) { return true ; } } return false ; }
Checks if a permission is stored for a user

@param \BeatSwitch\Lock\Callers\Caller $caller
@param \BeatSwitch\Lock\Permissions\Permission
@return bool
Checks if a permission is stored for a user