Nexus API Reference

ActorCommand extends Command
in package
implements SignalableCommandInterface

AbstractYes
Tags
psalm-api

Abstract base command for Nexus actor applications.

Handles runtime creation, actor system lifecycle, signal handling, and graceful shutdown. Subclasses implement buildApp() to register actors and dependencies.

Table of Contents

Interfaces

SignalableCommandInterface

Methods

getSubscribedSignals()  : array<string|int, mixed>
handleSignal()  : int|false
buildApp()  : void
Register actors and dependencies on the application.
configure()  : void
createLogger()  : LoggerInterface
Create the logger for the actor system. Override to customise handlers, formatters, or log level.
createRuntime()  : Runtime
Create the runtime for this command. Override to use a different runtime (e.g. for testing).
execute()  : int
shutdownTimeout()  : Duration
Graceful shutdown timeout duration.

Methods

getSubscribedSignals()

public getSubscribedSignals() : array<string|int, mixed>
Return values
array<string|int, mixed>

handleSignal()

public handleSignal(int $signal[, int|false $previousExitCode = 0 ]) : int|false
Parameters
$signal : int
$previousExitCode : int|false = 0
Return values
int|false

buildApp()

Register actors and dependencies on the application.

protected abstract buildApp(NexusApp $app, InputInterface $input) : void
Parameters
$app : NexusApp
$input : InputInterface

createLogger()

Create the logger for the actor system. Override to customise handlers, formatters, or log level.

protected createLogger() : LoggerInterface
Return values
LoggerInterface

createRuntime()

Create the runtime for this command. Override to use a different runtime (e.g. for testing).

protected createRuntime() : Runtime
Return values
Runtime

execute()

protected execute(InputInterface $input, OutputInterface $output) : int
Parameters
$input : InputInterface
$output : OutputInterface
Return values
int

        
On this page

Search results