forked from phalcon-orphanage/docs
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from phalcon/0.7.0
0.7.0
- Loading branch information
Showing
429 changed files
with
41,108 additions
and
928 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
build | ||
en/_build | ||
zh/_build | ||
_templates | ||
*.komodoproject | ||
*.sublime-* | ||
.idea/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,10 @@ | ||
Class **Phalcon\\Acl** | ||
====================== | ||
|
||
*implements* :doc:`Phalcon\\Events\\EventsAwareInterface <Phalcon_Events_EventsAwareInterface>` | ||
|
||
This component allows to manage ACL lists. An access control list (ACL) is a list of permissions attached to an object. An ACL specifies which users or system processes are granted access to objects, as well as what operations are allowed on given objects. | ||
|
||
.. code-block:: php | ||
<?php | ||
$acl = new Phalcon\Acl\Adapter\Memory(); | ||
//Default action is deny access | ||
$acl->setDefaultAction(Phalcon\Acl::DENY); | ||
//Create some roles | ||
$roleAdmins = new Phalcon\Acl\Role('Administrators', 'Super-User role'); | ||
$roleGuests = new Phalcon\Acl\Role('Guests'); | ||
//Add "Guests" role to acl | ||
$acl->addRole($roleGuests); | ||
//Add "Designers" role to acl | ||
$acl->addRole('Designers')); | ||
//Define the "Customers" resource | ||
$customersResource = new Phalcon\Acl\Resource('Customers', 'Customers management'); | ||
//Add "customers" resource with a couple of operations | ||
$acl->addResource($customersResource, 'search'); | ||
$acl->addResource($customersResource, array('create', 'update')); | ||
//Set access level for roles into resources | ||
$acl->allow('Guests', 'Customers', 'search'); | ||
$acl->allow('Guests', 'Customers', 'create'); | ||
$acl->deny('Guests', 'Customers', 'update'); | ||
//Check whether role has access to the operations | ||
$acl->isAllowed('Guests', 'Customers', 'edit') //Returns 0 | ||
$acl->isAllowed('Guests', 'Customers', 'search'); //Returns 1 | ||
$acl->isAllowed('Guests', 'Customers', 'create'); //Returns 1 | ||
Constants | ||
--------- | ||
|
||
*integer* **ALLOW** | ||
|
||
*integer* **DENY** | ||
|
||
Methods | ||
--------- | ||
|
||
public **setEventsManager** (*unknown* $eventsManager) | ||
|
||
Sets the events manager | ||
|
||
|
||
|
||
public :doc:`Phalcon\\Events\\ManagerInterface <Phalcon_Events_ManagerInterface>` **getEventsManager** () | ||
|
||
Returns the internal event manager | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Class **Phalcon\\Acl\\Adapter** | ||
=============================== | ||
|
||
*implements* :doc:`Phalcon\\Events\\EventsAwareInterface <Phalcon_Events_EventsAwareInterface>` | ||
|
||
Adapter for Phalcon\\Acl adapters | ||
|
||
|
||
Methods | ||
--------- | ||
|
||
public **setEventsManager** (*unknown* $eventsManager) | ||
|
||
Sets the events manager | ||
|
||
|
||
|
||
public :doc:`Phalcon\\Events\\ManagerInterface <Phalcon_Events_ManagerInterface>` **getEventsManager** () | ||
|
||
Returns the internal event manager | ||
|
||
|
||
|
||
public **setDefaultAction** (*int* $defaultAccess) | ||
|
||
Sets the default access level (Phalcon\\Acl::ALLOW or Phalcon\\Acl::DENY) | ||
|
||
|
||
|
||
public *int* **getDefaultAction** () | ||
|
||
Returns the default ACL access level | ||
|
||
|
||
|
||
public *string* **getActiveRole** () | ||
|
||
Returns the role which the list is checking if it's allowed to certain resource/access | ||
|
||
|
||
|
||
public *string* **getActiveResource** () | ||
|
||
Returns the resource which the list is checking if some role can access it | ||
|
||
|
||
|
||
public *string* **getActiveAccess** () | ||
|
||
Returns the access which the list is checking if some role can access it | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.