Ejemplo n.º 1
0
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $config = $serviceLocator->get('config');
     $config = $config['acl'];
     if (!isset($config['admins'])) {
         throw new \UnexpectedValueException('No admin-user set');
     }
     $roleManager = new RoleManager();
     $roleManager->setAdmins($config['admins'])->setAdminRole('admin')->setDefaultRole('guest')->setLoggedInRole('member');
     return $roleManager;
 }
Ejemplo n.º 2
0
 public function setUp()
 {
     $this->roleManager = new RoleManager();
     $this->roleManager->setAdmins(array('foo' => array('bar', 'baz'), 'bza' => array('foobar', 'foobaz')));
 }