create() public method

Creates configured instance of acl.
public create ( Phalcon\Config $config ) : Phalcon\Acl\Adapter\Memory
$config Phalcon\Config config
return Phalcon\Acl\Adapter\Memory acl
Beispiel #1
0
 /**
  * @expectedException \Phalcon\Acl\Exception
  * @expectedExceptionMessage Role "user" cannot inherit non-existent role "nonexistentrole".
  * Either such role does not exist or it is set to be inherited before it is actually defined.
  */
 public function testFactoryShouldThrowExceptionIfNonExistentInheritRoleIsSet()
 {
     $config = new Ini(INCUBATOR_FIXTURES . 'Acl/acl.ini');
     $config->acl->role->user->inherit = 'nonexistentrole';
     $factory = new MemoryFactory();
     $factory->create($config->get('acl'));
 }