mini\Phase
final
enum
Documentation
Application lifecycle phases
Represents the application's overall state, not individual request state. The Ready phase can handle many concurrent requests while remaining in Ready state.
Usage:
// Check current phase
echo Mini::$mini->phase->getCurrentState()->value; // "bootstrap"
// Transition to next phase
Mini::$mini->phase->trigger(Phase::Ready);
// Subscribe to phase transitions
Mini::$mini->phase->onEnteringState(Phase::Ready, function($old, $new) {
// Called when entering Ready phase
});
Typical flows:
- Traditional SAPI: Initializing → Bootstrap → Ready → Shutdown
- Long-running: Initializing → Bootstrap → Ready (handles requests) → Shutdown
- Failure: Any phase → Failed → Shutdown
Inheritance
Implements:
UnitEnum
BackedEnum
Cases (5)
Initializing
= 'initializing'
Bootstrap
= 'bootstrap'
Ready
= 'ready'
Failed
= 'failed'
Shutdown
= 'shutdown'
Properties (2)
public
readonly
string $name
public
readonly
string $value
Methods (3)
Documentation missing
Documentation missing
Documentation missing