Documentation

ConsoleKernel
in package
implements KernelInterface

The console kernel provides mechanisms to allow a user to interact with the application via the command line interface.

Tags
author

César de la Cal Bretschneider cesar@magic3w.com

Interfaces, Classes and Traits

KernelInterface
The kernel interface allows to define standard behaviors that a kernel must implement to get booted and be able to execute the way it's intended

Table of Contents

$commands  : Collection<string|int, Director>
__construct()  : mixed
all()  : Collection<string|int, Director>
The all method is intended as a mechanism to return a list of directors available to the user, making it easier for them to select a command to execute.
boot()  : mixed
The boot method receives no parameters, and is intended to let the kernel execute some initial housekeeping and setup tasks before it starts executing the user's command.
exec()  : int
The exec method takes a command, and a set of arguments to locate a single director and execute it.
initScripts()  : array<string|int, mixed>
The list of init scripts that need to be executed in order for the kernel to be usable.
register()  : ConsoleKernel
This method allows an application to register a command that the application wishes to expose to the end-user of the application.

Properties

Methods

__construct()

public __construct() : mixed
Return values
mixed

all()

The all method is intended as a mechanism to return a list of directors available to the user, making it easier for them to select a command to execute.

public all() : Collection<string|int, Director>
Return values
Collection<string|int, Director>

boot()

The boot method receives no parameters, and is intended to let the kernel execute some initial housekeeping and setup tasks before it starts executing the user's command.

public boot() : mixed
Return values
mixed

exec()

The exec method takes a command, and a set of arguments to locate a single director and execute it.

public exec(string $command, array<string|int, mixed> $arguments) : int
Parameters
$command : string
$arguments : array<string|int, mixed>
Tags
throws
CommandNotFoundException
Return values
int

initScripts()

The list of init scripts that need to be executed in order for the kernel to be usable.

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

register()

This method allows an application to register a command that the application wishes to expose to the end-user of the application.

public register(string $command, Director $body) : ConsoleKernel
Parameters
$command : string
$body : Director
Return values
ConsoleKernel

Search results