vendor/zfcampus/zf-mvc-auth/src/Authorization/AclAuthorizationFactory.php
/**
     * Create and return an AclAuthorization instance populated with provided privileges.
     *
     * @param array $config
     * @return AclAuthorization
     */
Create and return an AclAuthorization instance populated with provided privileges.
@param array $config
@return AclAuthorization
Create and return an AclAuthorization instance populated with provided privileges . @param array $config @return AclAuthorization
public static function factory(array $config)
    {
        $denyByDefault = false;
        if (array_key_exists('deny_by_default', $config)) {
            $denyByDefault = (bool) $config['deny_by_default'];
            unset($config['deny_by_default']);
        }
        $acl = new AclAuthorization;
        $acl->addRole('guest');
        $acl->allow();
        $grant = 'deny';
        if ($denyByDefault) {
            $acl->deny('guest', null, null);
            $grant = 'allow';
        }
        if (! empty($config)) {
            return self::injectGrants($acl, $grant, $config);
        }
        return $acl;
    }
public static function factory ( array $ config ) { $ denyByDefault = false ; if ( array_key_exists ( 'deny_by_default' , $ config ) ) { $ denyByDefault = ( bool ) $ config [ 'deny_by_default' ] ; unset ( $ config [ 'deny_by_default' ] ) ; } $ acl = new AclAuthorization ; $ acl -> addRole ( 'guest' ) ; $ acl -> allow ( ) ; $ grant = 'deny' ; if ( $ denyByDefault ) { $ acl -> deny ( 'guest' , null , null ) ; $ grant = 'allow' ; } if ( ! empty ( $ config ) ) { return self :: injectGrants ( $ acl , $ grant , $ config ) ; } return $ acl ; }
Create and return an AclAuthorization instance populated with provided privileges.
Create and return an AclAuthorization instance populated with provided privileges .
// Determine whether we are whitelisting or blacklisting // By default, create an open ACL