class Application extends Application (View source)

Properties

protected Handler $exceptionHandler The exception handler instance.
protected Application $laravel The Laravel application instance.

Methods

static Application
start(Application $app)

Create and boot a new Console application.

static Application
make(Application $app)

Create a new Console application.

$this
boot()

Boot the Console application.

void
call(string $command, array $parameters = array(), OutputInterface $output = null)

Run an Artisan console command by name.

Command
add(Command $command)

Add a command to the console.

Command
addToParent(Command $command)

Add the command to the parent instance.

Command
resolve(string $command)

Add a command, resolving through the application.

void
resolveCommands(array|mixed $commands)

Resolve an array of commands through the application.

InputDefinition
getDefaultInputDefinition()

Get the default input definitions for the applications.

InputOption
getEnvironmentOption()

Get the global environment option for the definition.

void
renderException(Exception $e, OutputInterface $output)

Render the given exception.

$this
setExceptionHandler(Handler $handler)

Set the exception handler instance.

$this
setLaravel(Application $laravel)

Set the Laravel application instance.

$this
setAutoExit(bool $boolean)

Set whether the Console app should auto-exit when done.

Details

static Application start(Application $app)

Create and boot a new Console application.

Parameters

Application $app

Return Value

Application

static Application make(Application $app)

Create a new Console application.

Parameters

Application $app

Return Value

Application

$this boot()

Boot the Console application.

Return Value

$this

void call(string $command, array $parameters = array(), OutputInterface $output = null)

Run an Artisan console command by name.

Parameters

string $command
array $parameters
OutputInterface $output

Return Value

void

Command add(Command $command)

Add a command to the console.

Parameters

Command $command

Return Value

Command

protected Command addToParent(Command $command)

Add the command to the parent instance.

Parameters

Command $command

Return Value

Command

Command resolve(string $command)

Add a command, resolving through the application.

Parameters

string $command

Return Value

Command

void resolveCommands(array|mixed $commands)

Resolve an array of commands through the application.

Parameters

array|mixed $commands

Return Value

void

protected InputDefinition getDefaultInputDefinition()

Get the default input definitions for the applications.

Return Value

InputDefinition

protected InputOption getEnvironmentOption()

Get the global environment option for the definition.

Return Value

InputOption

void renderException(Exception $e, OutputInterface $output)

Render the given exception.

Parameters

Exception $e
OutputInterface $output

Return Value

void

$this setExceptionHandler(Handler $handler)

Set the exception handler instance.

Parameters

Handler $handler

Return Value

$this

$this setLaravel(Application $laravel)

Set the Laravel application instance.

Parameters

Application $laravel

Return Value

$this

$this setAutoExit(bool $boolean)

Set whether the Console app should auto-exit when done.

Parameters

bool $boolean

Return Value

$this