PHP Class Gc\View\Helper\Acl

Inheritance: extends Zend\View\Helper\AbstractHelper
显示文件 Open project: gotcms/gotcms

Protected Properties

Property Type Description
$acl Gc\User\Role\Model User Acl
$roleName string Role name

Public Methods

Method Description
__construct ( Model $user ) Constructor
__invoke ( string $resource, string $permission ) : boolean Check acl

Method Details

__construct() public method

Constructor
public __construct ( Model $user )
$user Gc\User\Model User model to retrieve Acl, role name and check permission

__invoke() public method

Check acl
public __invoke ( string $resource, string $permission ) : boolean
$resource string Resource name
$permission string Permission name
return boolean

Property Details

$acl protected_oe property

User Acl
protected Model,Gc\User\Role $acl
return Gc\User\Role\Model

$roleName protected_oe property

Role name
protected string $roleName
return string