Event
Less than 1 minute
Event
Represents a migration event, which is a collection of migration actions to be executed together.
class Event extends \Hazaar\Model\StructExtends: Hazaar\Model\Struct
Handles construction, serialization, and execution of grouped migration actions.
Properties
actions
The list of actions to execute as part of the event.
public array $actionsType: array
user
public string $userType: string
Methods
construct
Initializes the event from the provided actions data.
public construct(mixed $actions): voidReturns: void
Ensures the actions are wrapped in an array and sets up serialization hooks.
Parameters
| Parameter | Type | Description |
|---|---|---|
$actions | mixed | The actions data to initialize from. Modified by reference. |
run
Executes all actions in the event.
public run(Adapter $dbi): boolReturns: bool
Logs an error and stops execution if any action fails.
Parameters
| Parameter | Type | Description |
|---|---|---|
$dbi | Hazaar\DBI\Adapter | the database adapter instance |
add
public add(ActionName $actionName, ActionType $actionType, BaseAction $actionSpec): ActionReturns: Hazaar\DBI\Manager\Migration\Action
Parameters
| Parameter | Type | Description |
|---|---|---|
$actionName | Hazaar\DBI\Manager\Migration\Enum\ActionName | |
$actionType | Hazaar\DBI\Manager\Migration\Enum\ActionType | |
$actionSpec | Hazaar\DBI\Manager\Migration\Action\BaseAction |
grant
public grant(?string $user): selfReturns: self
Parameters
| Parameter | Type | Description |
|---|---|---|
$user | string |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:16 +0000