コード例 #1
0
 /**
  *
  * Fetch a role from the database via its role_id attribute.
  *
  * If an array of role ids is given, an array of results will be returned.
  *
  * @param int|int[] $role_ids
  * @param bool $permissions
  * @return bool|Role
  */
 public function roleFetchById($role_ids, $permissions = true)
 {
     $role = $this->storage->roleFetchById($role_ids);
     if ($role and $permissions) {
         $this->roleLoadPermissions($role);
     }
     return $role;
 }