KMP PHP API Reference

AgeUpMembersCommand extends Command
in package

CLI command to age up youth members who have turned 18.

Supports dual-path dispatch: when a 'member-age-up' workflow is active, delegates to the workflow engine; otherwise runs legacy age-up logic. Dispatches per kingdom when kingdoms are configured so workflow actions can still use kingdom context without persisted tenant-scoped definitions.

Table of Contents

Properties

$triggerDispatcher  : TriggerDispatcher|null
Injected dispatcher. Tests may set this manually when constructing the command directly.

Methods

__construct()  : mixed
buildOptionParser()  : ConsoleOptionParser
execute()  : int
Execute command with dual-path dispatch.
setTriggerDispatcher()  : void
Set a custom TriggerDispatcher (for testing).
dispatchViaWorkflow()  : bool
Attempt to dispatch via the workflow engine.
executeLegacy()  : int
Run the legacy age-up logic.
getTriggerDispatcher()  : TriggerDispatcher
Resolve the workflow trigger dispatcher.

Properties

Methods

__construct()

public __construct([CommandFactoryInterface|null $factory = null ][, TriggerDispatcher|null $triggerDispatcher = null ]) : mixed
Parameters
$factory : CommandFactoryInterface|null = null

Command factory

$triggerDispatcher : TriggerDispatcher|null = null

Workflow trigger dispatcher

buildOptionParser()

public buildOptionParser(ConsoleOptionParser $parser) : ConsoleOptionParser
Parameters
$parser : ConsoleOptionParser
Tags
inheritDoc
Return values
ConsoleOptionParser

execute()

Execute command with dual-path dispatch.

public execute(Arguments $args, ConsoleIo $io) : int
Parameters
$args : Arguments

Console arguments instance.

$io : ConsoleIo

Console IO instance.

Return values
int

dispatchViaWorkflow()

Attempt to dispatch via the workflow engine.

protected dispatchViaWorkflow(ConsoleIo $io) : bool

Iterates over all kingdoms when a global workflow definition is active.

Parameters
$io : ConsoleIo

Console IO instance.

Return values
bool

True if workflow was dispatched, false to fall back to legacy.

executeLegacy()

Run the legacy age-up logic.

protected executeLegacy(Arguments $args, ConsoleIo $io) : int
Parameters
$args : Arguments

Console arguments instance.

$io : ConsoleIo

Console IO instance.

Return values
int
On this page

Search results