| Code Coverage | ||||||||||
| Lines | Functions and Methods | Classes and Traits | ||||||||
| Total | n/a | 0 / 0 | n/a | 0 / 0 | CRAP | n/a | 0 / 0 | |||
| 1 | <?php | 
| 2 | |
| 3 | /* | 
| 4 | * This program is free software; you can redistribute it and/or | 
| 5 | * modify it under the terms of the GNU General Public License | 
| 6 | * as published by the Free Software Foundation; under version 2 | 
| 7 | * of the License (non-upgradable). | 
| 8 | * | 
| 9 | * This program is distributed in the hope that it will be useful, | 
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 
| 12 | * GNU General Public License for more details. | 
| 13 | * | 
| 14 | * You should have received a copy of the GNU General Public License | 
| 15 | * along with this program; if not, write to the Free Software | 
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 
| 17 | * | 
| 18 | * Copyright (c) 2002-2008 (original work) Public Research Centre Henri Tudor & University of Luxembourg | 
| 19 | * (under the project TAO & TAO2); | 
| 20 | * 2008-2010 (update and modification) Deutsche Institut für Internationale Pädagogische Forschung | 
| 21 | * (under the project TAO-TRANSFER); | 
| 22 | * 2009-2012 (update and modification) Public Research Centre Henri Tudor | 
| 23 | * (under the project TAO-SUSTAIN & TAO-DEV); | 
| 24 | * | 
| 25 | */ | 
| 26 | |
| 27 | /** | 
| 28 | * Short description of class core_kernel_users_RolesManagement | 
| 29 | * | 
| 30 | * @access public | 
| 31 | * @author Jerome Bogaerts, <jerome@taotesting.com> | 
| 32 | * @package generis | 
| 33 | |
| 34 | */ | 
| 35 | interface core_kernel_users_RolesManagement | 
| 36 | { | 
| 37 | /** | 
| 38 | * Add a role in Generis. | 
| 39 | * | 
| 40 | * @access public | 
| 41 | * @author Jerome Bogaerts, <jerome@taotesting.com> | 
| 42 | * @param string $label The label to apply to the newly created Generis Role. | 
| 43 | * @param $includedRoles The Role(s) to be included in the newly created Generis Role. Can be either a Resource or | 
| 44 | * an array of Resources. | 
| 45 | * @return core_kernel_classes_Resource | 
| 46 | */ | 
| 47 | public function addRole($label, $includedRoles = null, core_kernel_classes_Class $class = null); | 
| 48 | |
| 49 | /** | 
| 50 | * Remove a Generis role from the persistent memory. User References to this | 
| 51 | * will be removed. | 
| 52 | * | 
| 53 | * @access public | 
| 54 | * @author Jerome Bogaerts, <jerome@taotesting.com> | 
| 55 | * @param Resource role The Role to remove. | 
| 56 | * @return boolean | 
| 57 | */ | 
| 58 | public function removeRole(core_kernel_classes_Resource $role); | 
| 59 | |
| 60 | /** | 
| 61 | * Get an array of the Roles included by a Generis Role. | 
| 62 | * | 
| 63 | * @access public | 
| 64 | * @author Jerome Bogaerts, <jerome@taotesting.com> | 
| 65 | * @param Resource role A Generis Role. | 
| 66 | * @return array | 
| 67 | */ | 
| 68 | public function getIncludedRoles(core_kernel_classes_Resource $role); | 
| 69 | |
| 70 | /** | 
| 71 | * Make a Role include another Role. | 
| 72 | * | 
| 73 | * @access public | 
| 74 | * @author Jerome Bogaerts, <jerome@taotesting.com> | 
| 75 | * @param core_kernel_classes_Resource role The role that needs to include another role. | 
| 76 | * @param core_kernel_classes_Resource roleToInclude The role to be included. | 
| 77 | */ | 
| 78 | public function includeRole(core_kernel_classes_Resource $role, core_kernel_classes_Resource $roleToInclude); | 
| 79 | |
| 80 | /** | 
| 81 | * Uninclude a Role from another Role. | 
| 82 | * | 
| 83 | * @author Jerome Bogaerts <jerome.taotesting.com> | 
| 84 | * @param core_kernel_classes_Resource role The role from which you want to uninclude a Role. | 
| 85 | * @param core_kernel_classes_Resource roleToUninclude The Role to uninclude. | 
| 86 | */ | 
| 87 | public function unincludeRole(core_kernel_classes_Resource $role, core_kernel_classes_Resource $roleToUninclude); | 
| 88 | |
| 89 | /** | 
| 90 | * Return all instances of Roles from the persistent memory of Generis. | 
| 91 | * | 
| 92 | * @access public | 
| 93 | * @author Jerome Bogaerts | 
| 94 | * @return array An associative array where keys are Role URIs and values are instances of the | 
| 95 | * core_kernel_classes_Resource class. | 
| 96 | */ | 
| 97 | public function getAllRoles(); | 
| 98 | } |