| 1 |
|
<?php |
| 2 |
|
/** |
| 3 |
|
* Xyster 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://www.opensource.org/licenses/bsd-license.php |
| 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 xyster@devweblog.org so we can send you a copy immediately. |
| 14 |
|
* |
| 15 |
|
* @category Xyster |
| 16 |
|
* @package Xyster_Acl |
| 17 |
|
* @copyright Copyright (c) 2007 Irrational Logic (http://devweblog.org) |
| 18 |
|
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License |
| 19 |
|
* @version $Id: Provider.php 91 2007-09-19 01:04:42Z doublecompile $ |
| 20 |
|
*/ |
| 21 |
|
/** |
| 22 |
|
* @see Xyster_Acl_RoleProvider_Interface |
| 23 |
|
*/ |
| 24 |
1 |
require_once 'Xyster/Acl/Role/Provider/Interface.php'; |
| 25 |
|
/** |
| 26 |
|
* Zend_Acl_Role |
| 27 |
|
*/ |
| 28 |
1 |
require_once 'Zend/Acl/Role.php'; |
| 29 |
|
/** |
| 30 |
|
* Default provider for authentication to authorization |
| 31 |
|
* |
| 32 |
|
* @category Xyster |
| 33 |
|
* @package Xyster_Acl |
| 34 |
|
* @copyright Copyright (c) 2007 Irrational Logic (http://devweblog.org) |
| 35 |
|
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License |
| 36 |
|
*/ |
| 37 |
|
class Xyster_Acl_Role_Provider implements Xyster_Acl_Role_Provider_Interface |
| 38 |
|
{ |
| 39 |
|
/** |
| 40 |
|
* Gets a Zend_Acl_Role_Interface based on the identity provided |
| 41 |
|
* |
| 42 |
|
* @param mixed $identity An identity as provided by Zend_Auth |
| 43 |
|
* @return Zend_Acl_Role_Interface The role to which this identity corresponds |
| 44 |
|
*/ |
| 45 |
|
public function getRole( $identity ) |
| 46 |
|
{ |
| 47 |
4 |
return new Zend_Acl_Role($identity); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
/** |
| 51 |
|
* Gets the parent roles for the provided role |
| 52 |
|
* |
| 53 |
|
* @param Zend_Acl_Role_Interface $role |
| 54 |
|
* @return array An array of Zend_Acl_Role_Interface objects |
| 55 |
|
*/ |
| 56 |
|
public function getRoleParents( Zend_Acl_Role_Interface $role ) |
| 57 |
|
{ |
| 58 |
3 |
return array(); |
| 59 |
|
} |
| 60 |
|
} |