SymfonyComponentConsoleShell

A Shell wraps an Application to add shell capabilities to it.

Support for history and completion only works with a PHP compiled with readline support (either --with-readline or --with-libedit)

File
vendorSymfonyComponentConsoleShell.php
Package
Default
Class hierarchy
SymfonyComponentConsoleShell

Tags

author

Fabien Potencier fabien@symfony.com

Martin Hasoň martin.hason@gmail.com

Properties

$application

$application : 

Type

Tags

None found

$history

$history : 

Type

Tags

None found

$output

$output : 

Type

Tags

None found

$hasReadline

$hasReadline : 

Type

Tags

None found

$prompt

$prompt : 

Type

Tags

None found

$processIsolation

$processIsolation : 

Type

Tags

None found

Methods

__construct()

__construct(\Symfony\Component\Console\Application  $application) 

Constructor.

If there is no readline support for the current PHP executable a RuntimeException exception is thrown.

Parameters

SymfonyComponentConsoleApplication $application

An application instance

Tags

None found

run()

run() 

Runs the shell.

Tags

None found

getProcessIsolation()

getProcessIsolation() 

Tags

None found

setProcessIsolation()

setProcessIsolation(  $processIsolation) 

Parameters

$processIsolation

Tags

None found

getHeader()

getHeader() : string

Returns the shell header.

Returns

string —

The header string

Tags

None found

autocompleter()

autocompleter(string  $text) : Boolean|array

Tries to return autocompletion for the current entered text.

Parameters

string $text

The last segment of the entered text

Returns

Boolean|array —

A list of guessed strings or true

Tags

None found

readline()

readline() : string

Reads a single line from standard input.

Returns

string —

The single line from standard input

Tags

None found