ConsoleKernel
- Full name:
\Codefy\Framework\Console\ConsoleKernel
- This class implements:
\Codefy\Framework\Contracts\Console\Kernel
Properties
codex
commands
commandsLoaded
schedule
bootstrappers
codefy
Methods
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$codefy | \Codefy\Framework\Application |
defineConsoleSchedule
handle
Handle an incoming console command.
public handle(\Symfony\Component\Console\Input\InputInterface $input, ?\Symfony\Component\Console\Output\OutputInterface $output = null): int
Parameters:
Parameter | Type | Description |
---|---|---|
$input | \Symfony\Component\Console\Input\InputInterface | |
$output | ?\Symfony\Component\Console\Output\OutputInterface |
Throws:
schedule
Parameters:
Parameter | Type | Description |
---|---|---|
$schedule | \Codefy\Framework\Scheduler\Schedule |
commands
registerCommand
Registers a command.
Parameters:
Parameter | Type | Description |
---|---|---|
$command | callable|\Symfony\Component\Console\Command\Command |
addCommands
Add an array of commands to the console.
Parameters:
Parameter | Type | Description |
---|---|---|
$commands | array |
all
Gets all the commands registered.
output
Get the output for the last run command.
bootstrap
Bootstrap the console kernel.
getCodex
Retrieve the Codex instance.
load
Parameters:
Parameter | Type | Description |
---|---|---|
$commands | array |
call
Run a Codex console command by name.
public call(string $command, array $parameters = [], bool|\Symfony\Component\Console\Output\OutputInterface|null $outputBuffer = null): int
Parameters:
Parameter | Type | Description |
---|---|---|
$command | string | |
$parameters | array | |
$outputBuffer | bool|\Symfony\Component\Console\Output\OutputInterface|null |
Throws:
bootstrappers
Get the bootstrappers.
Automatically generated on 2025-10-13