Skip to content

Commit 72e7dee

Browse files
committed
Initial commit.
0 parents  commit 72e7dee

File tree

2,863 files changed

+705530
-0
lines changed

Some content is hidden

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

2,863 files changed

+705530
-0
lines changed

Acl.php

+1,237
Large diffs are not rendered by default.

Acl/Assert/Interface.php

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
/**
3+
* Zend Framework
4+
*
5+
* LICENSE
6+
*
7+
* This source file is subject to the new BSD license that is bundled
8+
* with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://framework.zend.com/license/new-bsd
11+
* If you did not receive a copy of the license and are unable to
12+
* obtain it through the world-wide-web, please send an email
13+
* to [email protected] so we can send you a copy immediately.
14+
*
15+
* @category Zend
16+
* @package Zend_Acl
17+
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18+
* @license http://framework.zend.com/license/new-bsd New BSD License
19+
* @version $Id: Interface.php 20096 2010-01-06 02:05:09Z bkarwin $
20+
*/
21+
22+
23+
/**
24+
* @see Zend_Acl
25+
*/
26+
#require_once 'Zend/Acl.php';
27+
28+
29+
/**
30+
* @see Zend_Acl_Role_Interface
31+
*/
32+
#require_once 'Zend/Acl/Role/Interface.php';
33+
34+
35+
/**
36+
* @see Zend_Acl_Resource_Interface
37+
*/
38+
#require_once 'Zend/Acl/Resource/Interface.php';
39+
40+
41+
/**
42+
* @category Zend
43+
* @package Zend_Acl
44+
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
45+
* @license http://framework.zend.com/license/new-bsd New BSD License
46+
*/
47+
interface Zend_Acl_Assert_Interface
48+
{
49+
/**
50+
* Returns true if and only if the assertion conditions are met
51+
*
52+
* This method is passed the ACL, Role, Resource, and privilege to which the authorization query applies. If the
53+
* $role, $resource, or $privilege parameters are null, it means that the query applies to all Roles, Resources, or
54+
* privileges, respectively.
55+
*
56+
* @param Zend_Acl $acl
57+
* @param Zend_Acl_Role_Interface $role
58+
* @param Zend_Acl_Resource_Interface $resource
59+
* @param string $privilege
60+
* @return boolean
61+
*/
62+
public function assert(Zend_Acl $acl, Zend_Acl_Role_Interface $role = null, Zend_Acl_Resource_Interface $resource = null,
63+
$privilege = null);
64+
}

Acl/Exception.php

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
/**
3+
* Zend Framework
4+
*
5+
* LICENSE
6+
*
7+
* This source file is subject to the new BSD license that is bundled
8+
* with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://framework.zend.com/license/new-bsd
11+
* If you did not receive a copy of the license and are unable to
12+
* obtain it through the world-wide-web, please send an email
13+
* to [email protected] so we can send you a copy immediately.
14+
*
15+
* @category Zend
16+
* @package Zend_Acl
17+
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18+
* @license http://framework.zend.com/license/new-bsd New BSD License
19+
* @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
20+
*/
21+
22+
23+
/**
24+
* @see Zend_Exception
25+
*/
26+
#require_once 'Zend/Exception.php';
27+
28+
29+
/**
30+
* @category Zend
31+
* @package Zend_Acl
32+
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
33+
* @license http://framework.zend.com/license/new-bsd New BSD License
34+
*/
35+
class Zend_Acl_Exception extends Zend_Exception
36+
{}

Acl/Resource.php

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
/**
3+
* Zend Framework
4+
*
5+
* LICENSE
6+
*
7+
* This source file is subject to the new BSD license that is bundled
8+
* with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://framework.zend.com/license/new-bsd
11+
* If you did not receive a copy of the license and are unable to
12+
* obtain it through the world-wide-web, please send an email
13+
* to [email protected] so we can send you a copy immediately.
14+
*
15+
* @category Zend
16+
* @package Zend_Acl
17+
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18+
* @license http://framework.zend.com/license/new-bsd New BSD License
19+
* @version $Id: Resource.php 20096 2010-01-06 02:05:09Z bkarwin $
20+
*/
21+
22+
23+
/**
24+
* @see Zend_Acl_Resource_Interface
25+
*/
26+
#require_once 'Zend/Acl/Resource/Interface.php';
27+
28+
29+
/**
30+
* @category Zend
31+
* @package Zend_Acl
32+
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
33+
* @license http://framework.zend.com/license/new-bsd New BSD License
34+
*/
35+
class Zend_Acl_Resource implements Zend_Acl_Resource_Interface
36+
{
37+
/**
38+
* Unique id of Resource
39+
*
40+
* @var string
41+
*/
42+
protected $_resourceId;
43+
44+
/**
45+
* Sets the Resource identifier
46+
*
47+
* @param string $resourceId
48+
* @return void
49+
*/
50+
public function __construct($resourceId)
51+
{
52+
$this->_resourceId = (string) $resourceId;
53+
}
54+
55+
/**
56+
* Defined by Zend_Acl_Resource_Interface; returns the Resource identifier
57+
*
58+
* @return string
59+
*/
60+
public function getResourceId()
61+
{
62+
return $this->_resourceId;
63+
}
64+
65+
/**
66+
* Defined by Zend_Acl_Resource_Interface; returns the Resource identifier
67+
* Proxies to getResourceId()
68+
*
69+
* @return string
70+
*/
71+
public function __toString()
72+
{
73+
return $this->getResourceId();
74+
}
75+
}

Acl/Resource/Interface.php

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* Zend Framework
4+
*
5+
* LICENSE
6+
*
7+
* This source file is subject to the new BSD license that is bundled
8+
* with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://framework.zend.com/license/new-bsd
11+
* If you did not receive a copy of the license and are unable to
12+
* obtain it through the world-wide-web, please send an email
13+
* to [email protected] so we can send you a copy immediately.
14+
*
15+
* @category Zend
16+
* @package Zend_Acl
17+
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18+
* @license http://framework.zend.com/license/new-bsd New BSD License
19+
* @version $Id: Interface.php 20096 2010-01-06 02:05:09Z bkarwin $
20+
*/
21+
22+
23+
/**
24+
* @category Zend
25+
* @package Zend_Acl
26+
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
27+
* @license http://framework.zend.com/license/new-bsd New BSD License
28+
*/
29+
interface Zend_Acl_Resource_Interface
30+
{
31+
/**
32+
* Returns the string identifier of the Resource
33+
*
34+
* @return string
35+
*/
36+
public function getResourceId();
37+
}

Acl/Role.php

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
/**
3+
* Zend Framework
4+
*
5+
* LICENSE
6+
*
7+
* This source file is subject to the new BSD license that is bundled
8+
* with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://framework.zend.com/license/new-bsd
11+
* If you did not receive a copy of the license and are unable to
12+
* obtain it through the world-wide-web, please send an email
13+
* to [email protected] so we can send you a copy immediately.
14+
*
15+
* @category Zend
16+
* @package Zend_Acl
17+
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18+
* @license http://framework.zend.com/license/new-bsd New BSD License
19+
* @version $Id: Role.php 20096 2010-01-06 02:05:09Z bkarwin $
20+
*/
21+
22+
23+
/**
24+
* @see Zend_Acl_Role_Interface
25+
*/
26+
#require_once 'Zend/Acl/Role/Interface.php';
27+
28+
29+
/**
30+
* @category Zend
31+
* @package Zend_Acl
32+
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
33+
* @license http://framework.zend.com/license/new-bsd New BSD License
34+
*/
35+
class Zend_Acl_Role implements Zend_Acl_Role_Interface
36+
{
37+
/**
38+
* Unique id of Role
39+
*
40+
* @var string
41+
*/
42+
protected $_roleId;
43+
44+
/**
45+
* Sets the Role identifier
46+
*
47+
* @param string $id
48+
* @return void
49+
*/
50+
public function __construct($roleId)
51+
{
52+
$this->_roleId = (string) $roleId;
53+
}
54+
55+
/**
56+
* Defined by Zend_Acl_Role_Interface; returns the Role identifier
57+
*
58+
* @return string
59+
*/
60+
public function getRoleId()
61+
{
62+
return $this->_roleId;
63+
}
64+
65+
/**
66+
* Defined by Zend_Acl_Role_Interface; returns the Role identifier
67+
* Proxies to getRoleId()
68+
*
69+
* @return string
70+
*/
71+
public function __toString()
72+
{
73+
return $this->getRoleId();
74+
}
75+
}

Acl/Role/Interface.php

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* Zend Framework
4+
*
5+
* LICENSE
6+
*
7+
* This source file is subject to the new BSD license that is bundled
8+
* with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://framework.zend.com/license/new-bsd
11+
* If you did not receive a copy of the license and are unable to
12+
* obtain it through the world-wide-web, please send an email
13+
* to [email protected] so we can send you a copy immediately.
14+
*
15+
* @category Zend
16+
* @package Zend_Acl
17+
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18+
* @license http://framework.zend.com/license/new-bsd New BSD License
19+
* @version $Id: Interface.php 20096 2010-01-06 02:05:09Z bkarwin $
20+
*/
21+
22+
23+
/**
24+
* @category Zend
25+
* @package Zend_Acl
26+
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
27+
* @license http://framework.zend.com/license/new-bsd New BSD License
28+
*/
29+
interface Zend_Acl_Role_Interface
30+
{
31+
/**
32+
* Returns the string identifier of the Role
33+
*
34+
* @return string
35+
*/
36+
public function getRoleId();
37+
}

0 commit comments

Comments
 (0)