src/Reflex/Lockdown/Roles/RoleTraits.php
public function has($permissions, $all = true)
    {
        if (! is_array($permissions)) {
            $permissions    =   (array) $permissions;
        }

        $permissions=   array_unique($permissions);
        $filtered   =   array_where($permissions, [$this, 'hasFilter']);

        if (true === $all) {
            return count($permissions) === count($filtered);
        }

        return 0 < count($filtered);
    }
public function has($permissions, $all = true)
    {
        if (! is_array($permissions)) {
            $permissions    =   (array) $permissions;
        }

        $permissions=   array_unique($permissions);
        $filtered   =   array_where($permissions, [$this, 'hasFilter']);

        if (true === $all) {
            return count($permissions) === count($filtered);
        }

        return 0 < count($filtered);
    }
public function has ( $ permissions , $ all = true ) { if ( ! is_array ( $ permissions ) ) { $ permissions = ( array ) $ permissions ; } $ permissions = array_unique ( $ permissions ) ; $ filtered = array_where ( $ permissions , [ $ this , 'hasFilter' ] ) ; if ( true === $ all ) { return count ( $ permissions ) === count ( $ filtered ) ; } return 0 < count ( $ filtered ) ; }
Does this role have supplied permission
@param mixed   $permissions Permission lookup
@param boolean $all         Check for all permissions
@return boolean
Does this role have supplied permission