Application
Less than 1 minute
Application
Properties
modules
public array $modules
commands
A list of commands registered with the application by modules.
public array $commands
name
private string $name
version
private string $version
input
private Input $input
output
private Output $output
methods
A list of methods registered with the application.
private array $methods
Methods
__construct
public __construct(string $name = 'UNKNOWN', string $version = 'UNKNOWN'): void
Parameters
Parameter | Type | Description |
---|---|---|
$name | string | |
$version | string |
add
public add(Module $module): void
Parameters
Parameter | Type | Description |
---|---|---|
$module | Module |
run
public run(): int
registerMethod
public registerMethod(array $method): void
Parameters
Parameter | Type | Description |
---|---|---|
$method | array |
handleException
public handleException(\Throwable $e): void
Parameters
Parameter | Type | Description |
---|---|---|
$e | \Throwable |
handleError
public handleError(int $errno, string $errstr, string $errfile, int $errline): bool
Parameters
Parameter | Type | Description |
---|---|---|
$errno | int | |
$errstr | string | |
$errfile | string | |
$errline | int |
shutdownHandler
Shutdown handler function.
public shutdownHandler(): void
This function is responsible for executing the shutdown tasks registered in the global variable $__shutdownTasks. It checks if the script is running in CLI mode or if headers have already been sent before executing the tasks.
Generated by Hazaar API Doc Generator on Wed, 25 Jun 2025 06:07:10 +0000