Skip to content

Commit

Permalink
Merge pull request #2 from phalcon/0.7.0
Browse files Browse the repository at this point in the history
0.7.0
  • Loading branch information
netstu committed Dec 4, 2012
2 parents a7f2f68 + d17fa61 commit f96d754
Show file tree
Hide file tree
Showing 429 changed files with 41,108 additions and 928 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
build
en/_build
zh/_build
_templates
*.komodoproject
*.sublime-*
.idea/
.idea/
16 changes: 15 additions & 1 deletion en/_static/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ h2 {
margin: 25px 0 0;
}

h3 {
font-weight: 600;
margin: 15px 0 10px;
}

/*p, li {
color: #434343;
}*/
Expand Down Expand Up @@ -462,6 +467,15 @@ div.highlight {
font-weight: bold;
}

.highlight .kn {
color: #000000;
font-weight: normal;
}

.highlight .sr {
color: #717171;
}

pre {
font-family: Monaco,Menlo,Consolas,"Courier New",monospace;
}
}
Binary file added en/_static/img/volt-bundle.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added en/_static/img/volt.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 0 additions & 57 deletions en/api/Phalcon_Acl.rst
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



53 changes: 53 additions & 0 deletions en/api/Phalcon_Acl_Adapter.rst
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



2 changes: 1 addition & 1 deletion en/api/Phalcon_Acl_AdapterInterface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Returns the default ACL access level



abstract public *boolean* **addRole** (:doc:`Phalcon\\Mvc\\RoleInterface <Phalcon_Mvc_RoleInterface>` $roleObject, *array* $accessInherits)
abstract public *boolean* **addRole** (:doc:`Phalcon\\Acl\\RoleInterface <Phalcon_Acl_RoleInterface>` $role, *array* $accessInherits)

Adds a role to the ACL list. Second parameter lets to inherit access data from other existing role

Expand Down
59 changes: 26 additions & 33 deletions en/api/Phalcon_Acl_Adapter_Memory.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class **Phalcon\\Acl\\Adapter\\Memory**
=======================================

*extends* :doc:`Phalcon\\Acl <Phalcon_Acl>`
*extends* :doc:`Phalcon\\Acl\\Adapter <Phalcon_Acl_Adapter>`

*implements* :doc:`Phalcon\\Events\\EventsAwareInterface <Phalcon_Events_EventsAwareInterface>`, :doc:`Phalcon\\Acl\\AdapterInterface <Phalcon_Acl_AdapterInterface>`

Expand Down Expand Up @@ -61,13 +61,6 @@ Manages ACL lists in memory
Constants
---------

*integer* **ALLOW**

*integer* **DENY**

Methods
---------

Expand All @@ -77,19 +70,7 @@ Phalcon\\Acl\\Adapter\\Memory constructor



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 *boolean* **addRole** (:doc:`Phalcon\\Acl\\RoleInterface <Phalcon_Acl_RoleInterface>` $roleObject, *array* $accessInherits)
public *boolean* **addRole** (:doc:`Phalcon\\Acl\\RoleInterface <Phalcon_Acl_RoleInterface>` $role, *array* $accessInherits)

Adds a role to the ACL list. Second parameter lets to inherit access data from other existing role Example:

Expand Down Expand Up @@ -221,39 +202,51 @@ Check whether a role is allowed to access an action from a resource
public *string* **getActiveRole** ()
protected **_rebuildAccessList** ()

Returns the role which the list is checking if it's allowed to certain resource/access
Rebuild the list of access from the inherit lists



public *string* **getActiveResource** ()
public **setEventsManager** (*unknown* $eventsManager) inherited from Phalcon\\Acl\\Adapter

Returns the resource which the list is checking if some role can access it
Sets the events manager



public *string* **getActiveAccess** ()
public :doc:`Phalcon\\Events\\ManagerInterface <Phalcon_Events_ManagerInterface>` **getEventsManager** () inherited from Phalcon\\Acl\\Adapter

Returns the access which the list is checking if some role can access it
Returns the internal event manager



protected **_rebuildAccessList** ()
public **setDefaultAction** (*int* $defaultAccess) inherited from Phalcon\\Acl\\Adapter

Rebuild the list of access from the inherit lists
Sets the default access level (Phalcon\\Acl::ALLOW or Phalcon\\Acl::DENY)



public **setEventsManager** (*unknown* $eventsManager) inherited from Phalcon\\Acl
public *int* **getDefaultAction** () inherited from Phalcon\\Acl\\Adapter

Sets the events manager
Returns the default ACL access level



public :doc:`Phalcon\\Events\\ManagerInterface <Phalcon_Events_ManagerInterface>` **getEventsManager** () inherited from Phalcon\\Acl
public *string* **getActiveRole** () inherited from Phalcon\\Acl\\Adapter

Returns the internal event manager
Returns the role which the list is checking if it's allowed to certain resource/access



public *string* **getActiveResource** () inherited from Phalcon\\Acl\\Adapter

Returns the resource which the list is checking if some role can access it



public *string* **getActiveAccess** () inherited from Phalcon\\Acl\\Adapter

Returns the access which the list is checking if some role can access it



14 changes: 13 additions & 1 deletion en/api/Phalcon_CLI_Dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@ Sets the default action suffix



public **setNamespaceName** (*string* $namespaceName) inherited from Phalcon\\Dispatcher

Sets a namespace to be prepended to the handler name



public *string* **getNamespaceName** () inherited from Phalcon\\Dispatcher

Gets a namespace to be prepended to the current handler name



public **setDefaultNamespace** (*string* $namespace) inherited from Phalcon\\Dispatcher

Sets the default namespace
Expand Down Expand Up @@ -169,7 +181,7 @@ Set a param by its name or numeric index



public *mixed* **getParam** (*mixed* $param, *string|array* $filters) inherited from Phalcon\\Dispatcher
public *mixed* **getParam** (*mixed* $param, *string|array* $filters, *mixed* $defaultValue) inherited from Phalcon\\Dispatcher

Gets a param by its name or numeric index

Expand Down
17 changes: 12 additions & 5 deletions en/api/Phalcon_Cache_Backend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This class implements common functionality for backend adapters. All the backend
Methods
---------

public **__construct** (:doc:`Phalcon\\Cache\\FrontendInterface <Phalcon_Cache_FrontendInterface>` $frontendObject, *array* $backendOptions)
public **__construct** (:doc:`Phalcon\\Cache\\FrontendInterface <Phalcon_Cache_FrontendInterface>` $frontend, *array* $options)

Phalcon\\Cache\\Backend constructor

Expand All @@ -31,6 +31,12 @@ Returns front-end instance adapter related to the back-end



public *array* **getOptions** ()

Returns the backend options



public *boolean* **isFresh** ()

Checks whether the last cache is fresh or cached
Expand All @@ -43,14 +49,15 @@ Checks whether the cache has starting buffering or not



public *string* **getLastKey** ()
public **setLastKey** (*string* $lastKey)

Sets the last key used in the cache

Gets the last key stored by the cache


public *string* **getLastKey** ()

abstract public **get** ()
Gets the last key stored by the cache

...


Loading

0 comments on commit f96d754

Please sign in to comment.