* @package generis */ interface core_kernel_users_RolesManagement { /** * Add a role in Generis. * * @access public * @author Jerome Bogaerts, * @param string label The label to apply to the newly created Generis Role. * @param includedRoles The Role(s) to be included in the newly created Generis Role. Can be either a Resource or an array of Resources. * @return core_kernel_classes_Resource */ public function addRole($label, $includedRoles = null, core_kernel_classes_Class $class = null); /** * Remove a Generis role from the persistent memory. User References to this * will be removed. * * @access public * @author Jerome Bogaerts, * @param Resource role The Role to remove. * @return boolean */ public function removeRole(core_kernel_classes_Resource $role); /** * Get an array of the Roles included by a Generis Role. * * @access public * @author Jerome Bogaerts, * @param Resource role A Generis Role. * @return array */ public function getIncludedRoles(core_kernel_classes_Resource $role); /** * Make a Role include another Role. * * @access public * @author Jerome Bogaerts, * @param core_kernel_classes_Resource role The role that needs to include another role. * @param core_kernel_classes_Resource roleToInclude The role to be included. */ public function includeRole(core_kernel_classes_Resource $role, core_kernel_classes_Resource $roleToInclude); /** * Uninclude a Role from another Role. * * @author Jerome Bogaerts * @param core_kernel_classes_Resource role The role from which you want to uninclude a Role. * @param core_kernel_classes_Resource roleToUninclude The Role to uninclude. */ public function unincludeRole(core_kernel_classes_Resource $role, core_kernel_classes_Resource $roleToUninclude); /** * Return all instances of Roles from the persistent memory of Generis. * * @access public * @author Jerome Bogaerts * @return array An associative array where keys are Role URIs and values are instances of the core_kernel_classes_Resource class. */ public function getAllRoles(); }