class Console implements ExtenderInterface

Properties

protected array $addCommands
protected array $scheduled

Methods

command(string $command)

Add a command to the console.

schedule(string $command, callable|string $callback, array $args = [])

Schedule a command to run on an interval.

void
extend( Container $container, Extension|null $extension = null)

No description

Details

Console command(string $command)

Add a command to the console.

Parameters

string $command : ::class attribute of command class, which must extend \Flarum\Console\AbstractCommand.

Return Value

Console

Console schedule(string $command, callable|string $callback, array $args = [])

Schedule a command to run on an interval.

Parameters

string $command : ::class attribute of command class, which must extend Flarum\Console\AbstractCommand.
callable|string $callback The callback can be a closure or invokable class, and should accept: - \Illuminate\Console\Scheduling\Event $event The callback should apply relevant methods to $event, and does not need to return anything.
array $args An array of args to call the command with.

Return Value

Console

See also

https://laravel.com/api/13.x/Illuminate/Console/Scheduling/Event.html
https://laravel.com/docs/13.x/scheduling#schedule-frequency-options for more information on available methods and what they do.

void extend( Container $container, Extension|null $extension = null)

Parameters

Container $container
Extension|null $extension

Return Value

void