factory() 공개 정적인 메소드

Static method to instantiate the ACL object and return itself to facilitate chaining methods together.
public static factory ( mixed $roles = null, mixed $resources = null ) : Acl
$roles mixed
$resources mixed
리턴 Acl
예제 #1
0
 public function testIsDeniedNoResource()
 {
     $editor = Role::factory('editor');
     $a = Acl::factory($editor);
     $a->deny('editor');
     $this->assertTrue($a->isDenied($editor, 'page'));
     $this->assertTrue($a->hasResource('page'));
 }