Exemplo n.º 1
0
 protected function _isProtectedResource($request)
 {
     $resources = $this->_acl->getResources();
     $controller = $request->getControllerName();
     if (in_array($controller, $resources)) {
         return true;
     } else {
         return false;
     }
 }
Exemplo n.º 2
0
 /**
  * @group ZF-8468
  */
 public function testgetResources()
 {
     $this->assertEquals(array(), $this->_acl->getResources());
     $this->_acl->addResource(new Resource\GenericResource('someResource'));
     $this->_acl->addResource(new Resource\GenericResource('someOtherResource'));
     $expected = array('someResource', 'someOtherResource');
     $this->assertEquals($expected, $this->_acl->getResources());
 }