Group
Less than 1 minute
Group
Trait providing group management methods for SQL-based DBI drivers.
trait GroupIncludes default implementations for listing, creating, dropping, checking, and modifying groups.
Methods
listGroups
public listGroups(): voidcreateGroup
Attempt to create a group by name.
public createGroup(string $name): boolParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | the name of the group to create |
dropGroup
Attempt to drop a group by name.
public dropGroup(string $name, bool $ifExists): boolParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | the name of the group to drop |
$ifExists | bool | if true, do not error if the group does not exist |
groupExists
Check if a group exists by name.
public groupExists(string $name): boolParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | the name of the group to check |
addToGroup
Add a user/role to a group.
public addToGroup(string $user, string $group): boolParameters
| Parameter | Type | Description |
|---|---|---|
$user | string | the user or role to add |
$group | string | the group to add to |
removeFromGroup
Remove a user/role from a group.
public removeFromGroup(string $user, string $group): boolParameters
| Parameter | Type | Description |
|---|---|---|
$user | string | the user or role to remove |
$group | string | the group to remove from |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000