PHP code example of marcusamatos / jvs-acl

1. Go to this page and download the library: Download marcusamatos/jvs-acl library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

marcusamatos / jvs-acl example snippets


return array(
    'modules' => array(
        #[...]
        'JvsAcl'
        #[...]
    );
);
json
return array(
    #[...]
    'jvs-acl' => array(
        'groups' => array(
            'guest',
            'member' => array('name' => 'Member', 'parent' => 'guest', 'visible' => true),
            'admin' => array('name' => 'Administrator', 'parent' => 'member', 'visible' => true),
            'developer' => array('name' => 'Developer', 'parent' => 'admin')
        ),
        'controllers' => array(
            'Application\Controller\Index' => array(
                'guest' => 'allow'
            ),
            'Application\Controller\Auth' => array(
                'guest' => array(
                    'allow' => array('index', 'forgetPassword')
                )
            ),
            'Admin\Controller\Index' => array(
                'admin'
            ),
        )
    )
    #[...]
);