PHP Class Phalcon\Acl\Factory\Memory

This factory is intended to be used to ease setup of \Phalcon\Acl\Adapter\Memory in case \Phalcon\Config is used for configuration.
Afficher le fichier Open project: phalcon/incubator Class Usage Examples

Méthodes publiques

Méthode Description
create ( Phalcon\Config $config ) : Phalcon\Acl\Adapter\Memory Creates configured instance of acl.

Méthodes protégées

Méthode Description
addAccessRulesToRole ( string $role, Phalcon\Config $rules ) Adds access rules to role.
addResources ( ) Adds resources from config to acl object.
addRole ( string $role, Phalcon\Config $rules ) Add role to acl.
addRoles ( ) Adds role from config to acl object.
castAction ( mixed $actions ) : array | null Cast actions
makeResource ( string $name, string | null $description = null ) : Phalcon\Acl\Resource Creates acl resource.
makeRole ( string $role, string | null $description = null ) : Phalcon\Acl\Role Creates acl role.

Method Details

addAccessRulesToRole() protected méthode

Adds access rules to role.
protected addAccessRulesToRole ( string $role, Phalcon\Config $rules )
$role string role
$rules Phalcon\Config rules

addResources() protected méthode

Adds resources from config to acl object.
protected addResources ( )

addRole() protected méthode

Add role to acl.
protected addRole ( string $role, Phalcon\Config $rules )
$role string role
$rules Phalcon\Config rules

addRoles() protected méthode

Adds role from config to acl object.
protected addRoles ( )

castAction() protected méthode

Cast actions
protected castAction ( mixed $actions ) : array | null
$actions mixed Actions
Résultat array | null

create() public méthode

Creates configured instance of acl.
public create ( Phalcon\Config $config ) : Phalcon\Acl\Adapter\Memory
$config Phalcon\Config config
Résultat Phalcon\Acl\Adapter\Memory acl

makeResource() protected méthode

Creates acl resource.
protected makeResource ( string $name, string | null $description = null ) : Phalcon\Acl\Resource
$name string Resource name
$description string | null Resource description [Optional]
Résultat Phalcon\Acl\Resource

makeRole() protected méthode

Creates acl role.
protected makeRole ( string $role, string | null $description = null ) : Phalcon\Acl\Role
$role string Role name
$description string | null Description [Optional]
Résultat Phalcon\Acl\Role