Skip to content

Commit 54bc21b

Browse files
committed
Merge pull request #600 from phalcon/2.0.x
2.0.10
2 parents 64cef4a + 3d008a8 commit 54bc21b

File tree

418 files changed

+37202
-324
lines changed

Some content is hidden

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

418 files changed

+37202
-324
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ chmod ugo+x /usr/bin/phalcon
9797
To get a list of available commands just execute following:
9898

9999
```bash
100-
$ phalcon commands help
100+
phalcon commands help
101101
```
102102

103103
This command should display something similar to:
104104

105-
```bash
105+
```sh
106106
$ phalcon list ?
107107

108108
Phalcon DevTools (2.0.9)

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@
1616
"ext-phalcon": "~2.0"
1717
},
1818
"require-dev": {
19-
"kherge/box": ">=2.5.2"
19+
"kherge/box": "^2.5"
2020
},
2121
"autoload": {
2222
"psr-4" : {
2323
"Phalcon\\" : "scripts/Phalcon/"
2424
}
2525
},
26+
"extra": {
27+
"branch-alias": {
28+
"dev-master": "2.0.x-dev"
29+
}
30+
},
2631
"bin": ["phalcon.php"]
2732
}

docs/LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
New BSD License
22
---------------
33

4-
Copyright (c) 2011-2015, Phalcon Team
4+
Copyright (c) 2011-2016, Phalcon Team
55
All rights reserved.
66

77
Redistribution and use in source and binary forms, with or without

docs/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
New BSD License
22
---------------
33

4-
Copyright (c) 2011-2015, Phalcon Team
4+
Copyright (c) 2011-2016, Phalcon Team
55
All rights reserved.
66

77
Redistribution and use in source and binary forms, with or without

ide/2.0.10/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.10/Phalcon/Config.php

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
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+
* @return mixed
58+
*/
59+
public function get($index, $defaultValue = null) {}
60+
61+
/**
62+
* Gets an attribute using the array-syntax
63+
* <code>
64+
* print_r($config['database']);
65+
* </code>
66+
*
67+
* @param mixed $index
68+
* @return string
69+
*/
70+
public function offsetGet($index) {}
71+
72+
/**
73+
* Sets an attribute using the array-syntax
74+
* <code>
75+
* $config['database'] = array('type' => 'Sqlite');
76+
* </code>
77+
*
78+
* @param mixed $index
79+
* @param mixed $value
80+
*/
81+
public function offsetSet($index, $value) {}
82+
83+
/**
84+
* Unsets an attribute using the array-syntax
85+
* <code>
86+
* unset($config['database']);
87+
* </code>
88+
*
89+
* @param mixed $index
90+
*/
91+
public function offsetUnset($index) {}
92+
93+
/**
94+
* Merges a configuration into the current one
95+
* <code>
96+
* $appConfig = new \Phalcon\Config(array('database' => array('host' => 'localhost')));
97+
* $globalConfig->merge($config2);
98+
* </code>
99+
*
100+
* @param mixed $config
101+
* @return Config
102+
*/
103+
public function merge(Config $config) {}
104+
105+
/**
106+
* Converts recursively the object to an array
107+
* <code>
108+
* print_r($config->toArray());
109+
* </code>
110+
*
111+
* @return array
112+
*/
113+
public function toArray() {}
114+
115+
/**
116+
* Returns the count of properties set in the config
117+
* <code>
118+
* print count($config);
119+
* </code>
120+
* or
121+
* <code>
122+
* print $config->count();
123+
* </code>
124+
*
125+
* @return int
126+
*/
127+
public function count() {}
128+
129+
/**
130+
* Restores the state of a Phalcon\Config object
131+
*
132+
* @param array $data
133+
* @return Config
134+
*/
135+
public static function __set_state($data) {}
136+
137+
/**
138+
* Helper method for merge configs (forwarding nested config instance)
139+
*
140+
* @param Config $config
141+
* @param Config $instance = null
142+
* @return Config config
143+
*/
144+
protected final function _merge(Config $config, $instance = null) {}
145+
146+
}

0 commit comments

Comments
 (0)