%PDF- %PDF-
Direktori : /var/www/html/bbw/farmaci/kritik-portale/vendor/zfr/rbac/src/Rbac/Role/ |
Current File : /var/www/html/bbw/farmaci/kritik-portale/vendor/zfr/rbac/src/Rbac/Role/HierarchicalRole.php |
<?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Rbac\Role; /** * Simple implementation for a hierarchical role */ class HierarchicalRole extends Role implements HierarchicalRoleInterface { /** * @var array|RoleInterface[] */ protected $children = []; /** * {@inheritDoc} */ public function hasChildren() { return !empty($this->children); } /** * {@inheritDoc} */ public function getChildren() { return $this->children; } /** * Add a child role * * @param RoleInterface $child */ public function addChild(RoleInterface $child) { $this->children[$child->getName()] = $child; } }