private static function injectGrants(AclAuthorization $acl, $grantType, array $rules)
    {
        foreach ($rules as $set) {
            if (! is_array($set) || ! isset($set['resource'])) {
                continue;
            }

            self::injectGrant($acl, $grantType, $set);
        }

        return $acl;
    }
private static function injectGrants(AclAuthorization $acl, $grantType, array $rules)
    {
        foreach ($rules as $set) {
            if (! is_array($set) || ! isset($set['resource'])) {
                continue;
            }

            self::injectGrant($acl, $grantType, $set);
        }

        return $acl;
    }
private static function injectGrants ( AclAuthorization $ acl , $ grantType , array $ rules ) { foreach ( $ rules as $ set ) { if ( ! is_array ( $ set ) || ! isset ( $ set [ 'resource' ] ) ) { continue ; } self :: injectGrant ( $ acl , $ grantType , $ set ) ; } return $ acl ; }
Inject the ACL with the grants specified in the collection of rules.

@param AclAuthorization $acl
@param string $grantType Either "allow" or "deny".
@param array $rules
@return AclAuthorization
Inject the ACL with the grants specified in the collection of rules .