Skip to content

ConsoleKernel

Properties

codex

protected ?\Codefy\Framework\Console\ConsoleApplication $codex

commands

protected array $commands

commandsLoaded

protected bool $commandsLoaded

schedule

protected ?\Codefy\Framework\Scheduler\Schedule $schedule

bootstrappers

protected array $bootstrappers

codefy

protected \Codefy\Framework\Application $codefy

Methods

__construct

public __construct(\Codefy\Framework\Application $codefy): mixed

Parameters:

Parameter Type Description
$codefy \Codefy\Framework\Application

defineConsoleSchedule

protected defineConsoleSchedule(): void

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

protected schedule(\Codefy\Framework\Scheduler\Schedule $schedule): void

Parameters:

Parameter Type Description
$schedule \Codefy\Framework\Scheduler\Schedule

commands

protected commands(): void

registerCommand

Registers a command.

public registerCommand(callable|\Symfony\Component\Console\Command\Command $command): void

Parameters:

Parameter Type Description
$command callable|\Symfony\Component\Console\Command\Command

addCommands

Add an array of commands to the console.

public addCommands(array $commands): void

Parameters:

Parameter Type Description
$commands array

all

Gets all the commands registered.

public all(): array

output

Get the output for the last run command.

public output(): string

bootstrap

Bootstrap the console kernel.

public bootstrap(): void

getCodex

Retrieve the Codex instance.

protected getCodex(): \Codefy\Framework\Console\ConsoleApplication

load

protected load(array $commands = []): void

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.

protected bootstrappers(): string[]


Automatically generated on 2025-10-13