Fully Qualified Name: | Laminas\Console\Console |
A static, utility class for interacting with Console environment.
Declared abstract to prevent from instantiating.
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 |
Pass-thru static call to current AdapterInterface instance.
Parameter Name | Type | Description |
---|---|---|
$arguments | ||
$funcName | ||
$arguments |
Returns: mixed
Try to detect best matching adapter
Returns: string|null
Create and return Adapter\AdapterInterface instance.
Parameter Name | Type | Description |
---|---|---|
$forceAdapter | null|string | Optional |
$forceCharset | null|string | optional |
Returns: \Adapter\AdapterInterface
Check if running under MS Windows Ansicon
Returns: bool
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
Check if currently running under MS Windows
Returns: bool
Override the "is console environment" flag
Parameter Name | Type | Description |
---|---|---|
$flag | null|bool |
Returns:
Reset the console instance
Returns: