Class Console

Summary

Fully Qualified Name: Zend\Console\Console

Description

A static, utility class for interacting with Console environment.

Declared abstract to prevent from instantiating.

Methods

Name Description Defined By
__callStatic() Pass-thru static call to current AdapterInterface instance. Console
detectBestAdapter() Try to detect best matching adapter Console
getInstance() Create and return Adapter\AdapterInterface instance. Console
isAnsicon() Check if running under MS Windows Ansicon Console
isConsole() Check if running in a console environment (CLI) Console
isWindows() Check if currently running under MS Windows Console
overrideIsConsole() Override the "is console environment" flag Console
resetInstance() Reset the console instance Console

Method Details

__callStatic()

Pass-thru static call to current AdapterInterface instance.

Parameter Name Type Description
$arguments
$funcName
$arguments

Returns: mixed

detectBestAdapter()

Try to detect best matching adapter

Returns: string|null

getInstance()

Create and return Adapter\AdapterInterface instance.

Parameter Name Type Description
$forceAdapter null|string Optional
$forceCharset null|string optional

Returns: \Adapter\AdapterInterface

isAnsicon()

Check if running under MS Windows Ansicon

Returns: bool

isConsole()

Check if running in a console environment (CLI)

By default, returns value of PHP_SAPI global constant. If $isConsole is set, and a boolean value, that value will be returned.

Returns: bool

isWindows()

Check if currently running under MS Windows

Returns: bool

overrideIsConsole()

Override the "is console environment" flag

Parameter Name Type Description
$flag null|bool

Returns:

resetInstance()

Reset the console instance

Returns:

Top