Acl\Adapter\Memory::deny

public deny (mixed $roleName, mixed $resourceName, mixed $access, [mixed $func]) Deny access to a role on a resource You can use ‘*’ as wildcard Example: //Deny access to guests to search on customers $acl->deny('guests', 'customers', 'search'); //Deny access to guests to search or create on customers $acl->deny('guests', 'customers', array('search', 'create')); //Deny access to any role to browse on products $acl->deny('*', 'products', 'browse'); //Deny access to any role to

Acl\Adapter\Memory::allow

public allow (mixed $roleName, mixed $resourceName, mixed $access, [mixed $func]) Allow access to a role on a resource You can use ‘*’ as wildcard Example: //Allow access to guests to search on customers $acl->allow('guests', 'customers', 'search'); //Allow access to guests to search or create on customers $acl->allow('guests', 'customers', array('search', 'create')); //Allow access to any role to browse on products $acl->allow('*', 'products', 'browse'); //Allow access to any

Acl\Adapter\Memory::addRole

public addRole (RoleInterface | string $role, [array | string $accessInherits]) Adds a role to the ACL list. Second parameter allows inheriting access data from other existing role Example: $acl->addRole(new Phalcon\Acl\Role('administrator'), 'consultant'); $acl->addRole('administrator', 'consultant');

Acl\Adapter\Memory::addResourceAccess

public addResourceAccess (mixed $resourceName, array | string $accessList) Adds access to resources

Acl\Adapter\Memory::addResource

public addResource (Phalcon\Acl\Resource | string $resourceValue, array | string $accessList) Adds a resource to the ACL list Access names can be a particular action, by example search, update, delete, etc or a list of them Example: //Add a resource to the the list allowing access to an action $acl->addResource(new Phalcon\Acl\Resource('customers'), 'search'); $acl->addResource('customers', 'search'); //Add a resource with an access list $acl->addResource(new Phalcon\Acl\Resource

Acl\Adapter\Memory::addInherit

public addInherit (mixed $roleName, mixed $roleToInherit) Do a role inherit from another existing role

Acl\Adapter\Memory

extends abstract class Phalcon\Acl\Adapter implements Phalcon\Events\EventsAwareInterface, Phalcon\Acl\AdapterInterface Source on GitHub Manages ACL lists in memory $acl = new \Phalcon\Acl\Adapter\Memory(); $acl->setDefaultAction(Phalcon\Acl::DENY); //Register roles $roles = array( 'users' => new \Phalcon\Acl\Role('Users'), 'guests' => new \Phalcon\Acl\Role('Guests') ); foreach ($roles as $role) { $acl->addRole($role); } //Private area resources $privateResources = ar

Acl\AdapterInterface::setNoArgumentsDefaultAction

abstract public setNoArgumentsDefaultAction (mixed $defaultAccess) ...

Acl\AdapterInterface::setDefaultAction

abstract public setDefaultAction (mixed $defaultAccess) ...

Acl\AdapterInterface::isRole

abstract public isRole (mixed $roleName) ...