Skip to content

Instantly share code, notes, and snippets.

@bakura10
Last active December 27, 2015 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bakura10/7319646 to your computer and use it in GitHub Desktop.
Save bakura10/7319646 to your computer and use it in GitHub Desktop.
<?php
return array(
'zfc_rbac' => array(
'permissions' => array(
// Définition des providers. Exemple (syntaxe à réfléchir voir si on peut pas trouver mieux)
'ZfcRbac\Permission\InMemoryPermissionProvider' => array(
'member' => array('edit', 'read'),
'admin' => array('delete')
)
),
'assertions' => array(
'edit' => 'Application\Assertion\EditAssertion'
),
// Optionnel, pour les assertions avec dépendances
'assertion_manager' => array(
'factories' => array(
'Application\Assertion\EditAssertion' => 'MyFactory'
)
)
)
// Deuxième solution, on impose que les providers renvoient quelque chose qui ressemble à ça:
'nom_de_la_permission' => array(
'roles' => 'foo'
'assertion' => 'nom_assertion'
);
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment