Pop\Auth\Acl::factory PHP Метод

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
    public static function factory($roles = null, $resources = null)
    {
        return new self($roles, $resources);
    }

Usage Example

Пример #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'));
 }