class Application extends Application implements Application

Properties

protected Container $laravel

The Laravel application instance.

protected BufferedOutput $lastOutput

The output from the previous command.

static protected array $bootstrappers

The console application bootstrappers.

Methods

void
__construct(Container $laravel, Dispatcher $events, string $version)

Create a new Artisan console application.

static string
phpBinary()

Determine the proper PHP executable.

static string
artisanBinary()

Determine the proper Artisan executable.

static string
formatCommandString(string $string)

Format the given command as a fully-qualified executable command.

static void
starting(Closure $callback)

Register a console "starting" bootstrapper.

void
bootstrap()

Bootstrap the console application.

static void
forgetBootstrappers()

Clear the console application bootstrappers.

int
call(string $command, array $parameters = [], OutputInterface $outputBuffer = null)

Run an Artisan console command by name.

string
output()

Get the output for the last run command.

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.

$this
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.

getLaravel()

Get the Laravel application instance.

Details

at line 48
void __construct(Container $laravel, Dispatcher $events, string $version)

Create a new Artisan console application.

Parameters

Container $laravel
Dispatcher $events
string $version

Return Value

void

at line 66
static string phpBinary()

Determine the proper PHP executable.

Return Value

string

at line 76
static string artisanBinary()

Determine the proper Artisan executable.

Return Value

string

at line 87
static string formatCommandString(string $string)

Format the given command as a fully-qualified executable command.

Parameters

string $string

Return Value

string

at line 98
static void starting(Closure $callback)

Register a console "starting" bootstrapper.

Parameters

Closure $callback

Return Value

void

at line 108
protected void bootstrap()

Bootstrap the console application.

Return Value

void

at line 120
static void forgetBootstrappers()

Clear the console application bootstrappers.

Return Value

void

at line 133
int call(string $command, array $parameters = [], OutputInterface $outputBuffer = null)

Run an Artisan console command by name.

Parameters

string $command
array $parameters
OutputInterface $outputBuffer

Return Value

int

at line 153
string output()

Get the output for the last run command.

Return Value

string

at line 164
Command add(Command $command)

Add a command to the console.

Parameters

Command $command

Return Value

Command

at line 179
protected Command addToParent(Command $command)

Add the command to the parent instance.

Parameters

Command $command

Return Value

Command

at line 190
Command resolve(string $command)

Add a command, resolving through the application.

Parameters

string $command

Return Value

Command

at line 201
$this resolveCommands(array|mixed $commands)

Resolve an array of commands through the application.

Parameters

array|mixed $commands

Return Value

$this

at line 219
protected InputDefinition getDefaultInputDefinition()

Get the default input definitions for the applications.

This is used to add the --env option to every available command.

Return Value

InputDefinition

at line 231
protected InputOption getEnvironmentOption()

Get the global environment option for the definition.

Return Value

InputOption

at line 243
Application getLaravel()

Get the Laravel application instance.

Return Value

Application