Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Permissions / Rbac / RoleInterface.php
blobc0d0787d3d33244adaec621b1045ff6358c2a1e2
1 <?php
2 /**
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
8 */
10 namespace Zend\Permissions\Rbac;
12 use RecursiveIterator;
14 interface RoleInterface extends RecursiveIterator
16 /**
17 * Get the name of the role.
19 * @return string
21 public function getName();
23 /**
24 * Add permission to the role.
26 * @param $name
27 * @return RoleInterface
29 public function addPermission($name);
31 /**
32 * Checks if a permission exists for this role or any child roles.
34 * @param string $name
35 * @return bool
37 public function hasPermission($name);
39 /**
40 * Add a child.
42 * @param RoleInterface|string $child
43 * @return Role
45 public function addChild($child);
47 /**
48 * @param RoleInterface $parent
49 * @return RoleInterface
51 public function setParent($parent);
53 /**
54 * @return null|RoleInterface
56 public function getParent();