本文整理汇总了PHP中AuthService::roles方法的典型用法代码示例。如果您正苦于以下问题:PHP AuthService::roles方法的具体用法?PHP AuthService::roles怎么用?PHP AuthService::roles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AuthService
的用法示例。
在下文中一共展示了AuthService::roles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveRolesList
/**
* Update the roles list
* @static
* @param array $roles
* @return void
*/
static function saveRolesList($roles)
{
$confDriver = ConfService::getConfStorageImpl();
$confDriver->saveRoles($roles);
self::$roles = $roles;
}
示例2: getRolesList
/**
* Get all defined roles
* @static
* @param array $roleIds
* @param boolean $excludeReserved,
* @return AJXP_Role[]
*/
public static function getRolesList($roleIds = array(), $excludeReserved = false)
{
//if(isSet(self::$roles)) return self::$roles;
$confDriver = ConfService::getConfStorageImpl();
self::$roles = $confDriver->listRoles($roleIds, $excludeReserved);
$repoList = null;
foreach (self::$roles as $roleId => $roleObject) {
if (is_a($roleObject, "AjxpRole")) {
if ($repoList == null) {
$repoList = ConfService::getRepositoriesList("all");
}
$newRole = new AJXP_Role($roleId);
$newRole->migrateDeprectated($repoList, $roleObject);
self::$roles[$roleId] = $newRole;
self::updateRole($newRole);
}
}
return self::$roles;
}