Skip to content

Commit

Permalink
Merge pull request #471 from phalcon/2.0.x
Browse files Browse the repository at this point in the history
2.0.7
  • Loading branch information
sergeyklay committed Aug 18, 2015
2 parents 6f456e4 + f971bca commit 66b628c
Show file tree
Hide file tree
Showing 362 changed files with 36,658 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ $ phalcon commands
This command should display something similar to:

```bash
Phalcon DevTools (2.0.1)
Phalcon DevTools (2.0.7)

Help:
Lists the commands available in Phalcon devtools
Expand Down Expand Up @@ -171,13 +171,13 @@ $ phalcon webtools --action=enable
Should add 'adapter' parameter in your db config file (if you use not Mysql database). For PostgreSql will be

```php
$config = array(
$config = [
"host" => "localhost",
"dbname" => "my_db_name",
"username" => "my_db_user",
"password" => "my_db_user_password",
"adapter" => "Postgresql",
);
"adapter" => "Postgresql"
];
```

## License
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ext-phalcon": "~2.0"
},
"require-dev": {
"box": ">=2.5.2"
"kherge/box": ">=2.5.2"
},
"autoload": {
"psr-0" : {
Expand Down
45 changes: 45 additions & 0 deletions ide/2.0.7/Phalcon/Acl.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace Phalcon;

/**
* Phalcon\Acl
* 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>
* $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
* </code>
*/
abstract class Acl
{

const ALLOW = 1;


const DENY = 0;


}
145 changes: 145 additions & 0 deletions ide/2.0.7/Phalcon/Config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<?php

namespace Phalcon;

/**
* Phalcon\Config
* Phalcon\Config is designed to simplify the access to, and the use of, configuration data within applications.
* It provides a nested object property based user interface for accessing this configuration data within
* application code.
* <code>
* $config = new \Phalcon\Config(array(
* "database" => array(
* "adapter" => "Mysql",
* "host" => "localhost",
* "username" => "scott",
* "password" => "cheetah",
* "dbname" => "test_db"
* ),
* "phalcon" => array(
* "controllersDir" => "../app/controllers/",
* "modelsDir" => "../app/models/",
* "viewsDir" => "../app/views/"
* )
* ));
* </code>
*/
class Config implements \ArrayAccess, \Countable
{

/**
* Phalcon\Config constructor
*
* @param array $arrayConfig
*/
public function __construct($arrayConfig = null) {}

/**
* Allows to check whether an attribute is defined using the array-syntax
* <code>
* var_dump(isset($config['database']));
* </code>
*
* @param mixed $index
* @return bool
*/
public function offsetExists($index) {}

/**
* Gets an attribute from the configuration, if the attribute isn't defined returns null
* If the value is exactly null or is not defined the default value will be used instead
* <code>
* echo $config->get('controllersDir', '../app/controllers/');
* </code>
*
* @param mixed $index
* @param mixed $defaultValue
*/
public function get($index, $defaultValue = null) {}

/**
* Gets an attribute using the array-syntax
* <code>
* print_r($config['database']);
* </code>
*
* @param mixed $index
* @return string
*/
public function offsetGet($index) {}

/**
* Sets an attribute using the array-syntax
* <code>
* $config['database'] = array('type' => 'Sqlite');
* </code>
*
* @param mixed $index
* @param mixed $value
*/
public function offsetSet($index, $value) {}

/**
* Unsets an attribute using the array-syntax
* <code>
* unset($config['database']);
* </code>
*
* @param mixed $index
*/
public function offsetUnset($index) {}

/**
* Merges a configuration into the current one
* <code>
* $appConfig = new \Phalcon\Config(array('database' => array('host' => 'localhost')));
* $globalConfig->merge($config2);
* </code>
*
* @param mixed $config
* @return Config
*/
public function merge(Config $config) {}

/**
* Converts recursively the object to an array
* <code>
* print_r($config->toArray());
* </code>
*
* @return array
*/
public function toArray() {}

/**
* Returns the count of properties set in the config
* <code>
* print count($config);
* </code>
* or
* <code>
* print $config->count();
* </code>
*
* @return int
*/
public function count() {}

/**
* Restores the state of a Phalcon\Config object
*
* @param array $data
* @return Config
*/
public static function __set_state($data) {}

/**
* Helper method for merge configs (forwarding nested config instance)
*
* @param Config $config
* @param Config $instance = null
* @return Config config
*/
protected final function _merge(Config $config, $instance = null) {}

}
Loading

0 comments on commit 66b628c

Please sign in to comment.