Skip to content

Commit 66b628c

Browse files
committed
Merge pull request #471 from phalcon/2.0.x
2.0.7
2 parents 6f456e4 + f971bca commit 66b628c

File tree

362 files changed

+36658
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

362 files changed

+36658
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ $ phalcon commands
128128
This command should display something similar to:
129129

130130
```bash
131-
Phalcon DevTools (2.0.1)
131+
Phalcon DevTools (2.0.7)
132132

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

173173
```php
174-
$config = array(
174+
$config = [
175175
"host" => "localhost",
176176
"dbname" => "my_db_name",
177177
"username" => "my_db_user",
178178
"password" => "my_db_user_password",
179-
"adapter" => "Postgresql",
180-
);
179+
"adapter" => "Postgresql"
180+
];
181181
```
182182

183183
## License

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"ext-phalcon": "~2.0"
1717
},
1818
"require-dev": {
19-
"box": ">=2.5.2"
19+
"kherge/box": ">=2.5.2"
2020
},
2121
"autoload": {
2222
"psr-0" : {

ide/2.0.7/Phalcon/Acl.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
namespace Phalcon;
4+
5+
/**
6+
* Phalcon\Acl
7+
* This component allows to manage ACL lists. An access control list (ACL) is a list
8+
* of permissions attached to an object. An ACL specifies which users or system processes
9+
* are granted access to objects, as well as what operations are allowed on given objects.
10+
* <code>
11+
* $acl = new \Phalcon\Acl\Adapter\Memory();
12+
* //Default action is deny access
13+
* $acl->setDefaultAction(\Phalcon\Acl::DENY);
14+
* //Create some roles
15+
* $roleAdmins = new \Phalcon\Acl\Role('Administrators', 'Super-User role');
16+
* $roleGuests = new \Phalcon\Acl\Role('Guests');
17+
* //Add "Guests" role to acl
18+
* $acl->addRole($roleGuests);
19+
* //Add "Designers" role to acl
20+
* $acl->addRole('Designers');
21+
* //Define the "Customers" resource
22+
* $customersResource = new \Phalcon\Acl\Resource('Customers', 'Customers management');
23+
* //Add "customers" resource with a couple of operations
24+
* $acl->addResource($customersResource, 'search');
25+
* $acl->addResource($customersResource, array('create', 'update'));
26+
* //Set access level for roles into resources
27+
* $acl->allow('Guests', 'Customers', 'search');
28+
* $acl->allow('Guests', 'Customers', 'create');
29+
* $acl->deny('Guests', 'Customers', 'update');
30+
* //Check whether role has access to the operations
31+
* $acl->isAllowed('Guests', 'Customers', 'edit'); //Returns 0
32+
* $acl->isAllowed('Guests', 'Customers', 'search'); //Returns 1
33+
* $acl->isAllowed('Guests', 'Customers', 'create'); //Returns 1
34+
* </code>
35+
*/
36+
abstract class Acl
37+
{
38+
39+
const ALLOW = 1;
40+
41+
42+
const DENY = 0;
43+
44+
45+
}

ide/2.0.7/Phalcon/Config.php

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<?php
2+
3+
namespace Phalcon;
4+
5+
/**
6+
* Phalcon\Config
7+
* Phalcon\Config is designed to simplify the access to, and the use of, configuration data within applications.
8+
* It provides a nested object property based user interface for accessing this configuration data within
9+
* application code.
10+
* <code>
11+
* $config = new \Phalcon\Config(array(
12+
* "database" => array(
13+
* "adapter" => "Mysql",
14+
* "host" => "localhost",
15+
* "username" => "scott",
16+
* "password" => "cheetah",
17+
* "dbname" => "test_db"
18+
* ),
19+
* "phalcon" => array(
20+
* "controllersDir" => "../app/controllers/",
21+
* "modelsDir" => "../app/models/",
22+
* "viewsDir" => "../app/views/"
23+
* )
24+
* ));
25+
* </code>
26+
*/
27+
class Config implements \ArrayAccess, \Countable
28+
{
29+
30+
/**
31+
* Phalcon\Config constructor
32+
*
33+
* @param array $arrayConfig
34+
*/
35+
public function __construct($arrayConfig = null) {}
36+
37+
/**
38+
* Allows to check whether an attribute is defined using the array-syntax
39+
* <code>
40+
* var_dump(isset($config['database']));
41+
* </code>
42+
*
43+
* @param mixed $index
44+
* @return bool
45+
*/
46+
public function offsetExists($index) {}
47+
48+
/**
49+
* Gets an attribute from the configuration, if the attribute isn't defined returns null
50+
* If the value is exactly null or is not defined the default value will be used instead
51+
* <code>
52+
* echo $config->get('controllersDir', '../app/controllers/');
53+
* </code>
54+
*
55+
* @param mixed $index
56+
* @param mixed $defaultValue
57+
*/
58+
public function get($index, $defaultValue = null) {}
59+
60+
/**
61+
* Gets an attribute using the array-syntax
62+
* <code>
63+
* print_r($config['database']);
64+
* </code>
65+
*
66+
* @param mixed $index
67+
* @return string
68+
*/
69+
public function offsetGet($index) {}
70+
71+
/**
72+
* Sets an attribute using the array-syntax
73+
* <code>
74+
* $config['database'] = array('type' => 'Sqlite');
75+
* </code>
76+
*
77+
* @param mixed $index
78+
* @param mixed $value
79+
*/
80+
public function offsetSet($index, $value) {}
81+
82+
/**
83+
* Unsets an attribute using the array-syntax
84+
* <code>
85+
* unset($config['database']);
86+
* </code>
87+
*
88+
* @param mixed $index
89+
*/
90+
public function offsetUnset($index) {}
91+
92+
/**
93+
* Merges a configuration into the current one
94+
* <code>
95+
* $appConfig = new \Phalcon\Config(array('database' => array('host' => 'localhost')));
96+
* $globalConfig->merge($config2);
97+
* </code>
98+
*
99+
* @param mixed $config
100+
* @return Config
101+
*/
102+
public function merge(Config $config) {}
103+
104+
/**
105+
* Converts recursively the object to an array
106+
* <code>
107+
* print_r($config->toArray());
108+
* </code>
109+
*
110+
* @return array
111+
*/
112+
public function toArray() {}
113+
114+
/**
115+
* Returns the count of properties set in the config
116+
* <code>
117+
* print count($config);
118+
* </code>
119+
* or
120+
* <code>
121+
* print $config->count();
122+
* </code>
123+
*
124+
* @return int
125+
*/
126+
public function count() {}
127+
128+
/**
129+
* Restores the state of a Phalcon\Config object
130+
*
131+
* @param array $data
132+
* @return Config
133+
*/
134+
public static function __set_state($data) {}
135+
136+
/**
137+
* Helper method for merge configs (forwarding nested config instance)
138+
*
139+
* @param Config $config
140+
* @param Config $instance = null
141+
* @return Config config
142+
*/
143+
protected final function _merge(Config $config, $instance = null) {}
144+
145+
}

0 commit comments

Comments
 (0)