Example #1
0
 public function registerPublicResources()
 {
     $add_resource = function ($actions, $resource) {
         $this->adaptor->addResource(new Resource($resource), $actions);
     };
     array_walk($this->public_resources, $add_resource);
 }
Example #2
0
 /**
  * Registered resources with the Access.
  *
  * @param \Phalcon\Acl\AdapterInterface $access
  * @return $this
  */
 public function registerAccess(AclAdapterInterface $access)
 {
     $this->_access = $access;
     $access->addResource(new AclResource(get_class($this->_resource)), $this->_methodName);
     return $this;
 }