74. Class

74.1. Zend\Console\Adapter\Windows

74.1.1. Methods

74.1.1.1. getWidth

getWidth()

Determine and return current console width.

Return type:int

74.1.1.2. getHeight

getHeight()

Determine and return current console height.

Return type:false|int

74.1.1.3. runProbeCommand

runProbeCommand()

Probe for system capabilities and cache results

Run a Windows Powershell command that determines parameters of console window. The command is fed through standard input (with echo) to prevent Powershell from creating a sub-thread and hanging PHP when run through a debugger/IDE.

Return type:void

74.1.1.4. runModeCommand

runModeCommand()

Run and cache results of mode command

Return type:void

74.1.1.5. isUtf8

isUtf8()

Check if console is UTF-8 compatible

Return type:bool

74.1.1.6. setPos

setPos()

Set cursor position

Parameters:
  • int
  • int

74.1.1.7. getTitle

getTitle()

Return current console window title.

Return type:string

74.1.1.8. setCharset

setCharset()

Set Console charset to use.

Parameters:CharsetCharsetInterface

74.1.1.9. getCharset

getCharset()

Get charset currently in use by this adapter.

Return type:CharsetCharsetInterface $charset

74.1.1.10. getDefaultCharset

getDefaultCharset()

@return CharsetAsciiExtended

74.1.1.11. switchToUtf8

switchToUtf8()

Switch to utf-8 encoding

Return type:void

74.1.1.12. clear

clear()

Clear console screen

74.1.1.13. clearLine

clearLine()

Clear line at cursor position

74.1.1.14. readChar

readChar()

Read a single character from the console input

Parameters:string|null – A list of allowed chars
Throws ExceptionRuntimeException:
 
Return type:string

74.1.1.15. readLine

readLine()

Read a single line from the console input.

Parameters:int – Maximum response length
Return type:string