1: <?php
2: /**
3: * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4: * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
5: *
6: * Licensed under The MIT License
7: * Redistributions of files must retain the above copyright notice.
8: *
9: * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
10: * @link http://cakephp.org CakePHP(tm) Project
11: * @package Cake.Controller.Component
12: * @since CakePHP(tm) v 0.10.0.1076
13: * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
14: */
15:
16: /**
17: * Access Control List interface.
18: * Implementing classes are used by AclComponent to perform ACL checks in Cake.
19: *
20: * @package Cake.Controller.Component
21: */
22: interface AclInterface {
23:
24: /**
25: * Empty method to be overridden in subclasses
26: *
27: * @param string $aro ARO The requesting object identifier.
28: * @param string $aco ACO The controlled object identifier.
29: * @param string $action Action (defaults to *)
30: */
31: public function check($aro, $aco, $action = "*");
32:
33: /**
34: * Allow methods are used to grant an ARO access to an ACO.
35: *
36: * @param string $aro ARO The requesting object identifier.
37: * @param string $aco ACO The controlled object identifier.
38: * @param string $action Action (defaults to *)
39: * @return boolean Success
40: */
41: public function allow($aro, $aco, $action = "*");
42:
43: /**
44: * Deny methods are used to remove permission from an ARO to access an ACO.
45: *
46: * @param string $aro ARO The requesting object identifier.
47: * @param string $aco ACO The controlled object identifier.
48: * @param string $action Action (defaults to *)
49: * @return boolean Success
50: */
51: public function deny($aro, $aco, $action = "*");
52:
53: /**
54: * Inherit methods modify the permission for an ARO to be that of its parent object.
55: *
56: * @param string $aro ARO The requesting object identifier.
57: * @param string $aco ACO The controlled object identifier.
58: * @param string $action Action (defaults to *)
59: * @return boolean Success
60: */
61: public function inherit($aro, $aco, $action = "*");
62:
63: /**
64: * Initialization method for the Acl implementation
65: *
66: * @param AclComponent $component
67: */
68: public function initialize(Component $component);
69:
70: }
71: