3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Permissions\Rbac
;
12 use RecursiveIterator
;
14 interface RoleInterface
extends RecursiveIterator
17 * Get the name of the role.
21 public function getName();
24 * Add permission to the role.
27 * @return RoleInterface
29 public function addPermission($name);
32 * Checks if a permission exists for this role or any child roles.
37 public function hasPermission($name);
42 * @param RoleInterface|string $child
45 public function addChild($child);
48 * @param RoleInterface $parent
49 * @return RoleInterface
51 public function setParent($parent);
54 * @return null|RoleInterface
56 public function getParent();