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('customers'), array('create', 'search'));
 $acl->addResource('customers', array('create', 'search'));
doc_Phalcon
2016-10-16 09:47:26
Comments
Leave a Comment

Please login to continue.