private static function injectGrant(AclAuthorization $acl, $grantType, array $ruleSet)
    {
        // Add new resource to ACL
        $resource = $ruleSet['resource'];
        $acl->addResource($ruleSet['resource']);

        // Deny guest specified privileges to resource
        $privileges = isset($ruleSet['privileges']) ? $ruleSet['privileges'] : null;

        // null privileges means no permissions were setup; nothing to do
        if (null === $privileges) {
            return;
        }

        $acl->$grantType('guest', $resource, $privileges);
    }
private static function injectGrant(AclAuthorization $acl, $grantType, array $ruleSet)
    {
        // Add new resource to ACL
        $resource = $ruleSet['resource'];
        $acl->addResource($ruleSet['resource']);

        // Deny guest specified privileges to resource
        $privileges = isset($ruleSet['privileges']) ? $ruleSet['privileges'] : null;

        // null privileges means no permissions were setup; nothing to do
        if (null === $privileges) {
            return;
        }

        $acl->$grantType('guest', $resource, $privileges);
    }
private static function injectGrant ( AclAuthorization $ acl , $ grantType , array $ ruleSet ) { // Add new resource to ACL $ resource = $ ruleSet [ 'resource' ] ; $ acl -> addResource ( $ ruleSet [ 'resource' ] ) ; // Deny guest specified privileges to resource $ privileges = isset ( $ ruleSet [ 'privileges' ] ) ? $ ruleSet [ 'privileges' ] : null ; // null privileges means no permissions were setup; nothing to do if ( null === $ privileges ) { return ; } $ acl -> $ grantType ( 'guest' , $ resource , $ privileges ) ; }
Inject the ACL with the grant specified by a single rule set.

@param AclAuthorization $acl
@param string $grantType
@param array $ruleSet
@return void
Inject the ACL with the grant specified by a single rule set .