master

laravel/framework

Last updated at: 29/12/2023 09:21

Application.php

TLDR

The Application.php file in the Illuminate\Contracts\Console namespace defines an interface for an Artisan console application in the Laravel framework.

Methods

call

This method allows running an Artisan console command by its name. It has the following parameters:

  • $command: The name of the command to run.
  • $parameters (optional): An array of additional parameters to pass to the command.
  • $outputBuffer (optional): An instance of the OutputInterface class from the Symfony Console component to store the output.

The method returns an integer value.

output

This method retrieves the output from the last command that was executed.

Classes

No classes are defined in this file.

<?php

namespace Illuminate\Contracts\Console;

interface Application
{
    /**
     * Run an Artisan console command by name.
     *
     * @param  string  $command
     * @param  array  $parameters
     * @param  \Symfony\Component\Console\Output\OutputInterface|null  $outputBuffer
     * @return int
     */
    public function call($command, array $parameters = [], $outputBuffer = null);

    /**
     * Get the output from the last command.
     *
     * @return string
     */
    public function output();
}