75.1. Zend\Console\Adapter\WindowsAnsicon
MS Windows with ANSICON console adapter
- This adapter requires ANSICON extension to be installed. It can be obtained from:
- https://github.com/adoxa/ansicon
ANSICON has to be loaded and enabled before using this adapter. It’s best to install
it using following command:
ansicon -I
Console should not run in UTF8 code page (65001), because ANSICON does not behave well with it.
It’s best to use non-unicode code page 437, 850, 851, 852 or similar. Run “help mode” for more
information on how to change Windows console code page.
75.1.1. Methods
75.1.1.1. getWidth
-
getWidth()
Determine and return current console width.
75.1.1.2. getHeight
-
getHeight()
Determine and return current console height.
75.1.1.3. runModeCommand
-
runModeCommand()
Run and cache results of mode command
75.1.1.4. isUtf8
-
isUtf8()
Check if console is UTF-8 compatible
75.1.1.5. getTitle
-
getTitle()
Return current console window title.
75.1.1.6. clear
-
clear()
Clear console screen
75.1.1.7. clearLine
-
clearLine()
Clear line at cursor position
75.1.1.8. setCharset
-
setCharset()
Set Console charset to use.
Parameters: | CharsetInterface – |
75.1.1.9. getCharset
-
getCharset()
Get charset currently in use by this adapter.
Return type: | CharsetInterface $charset |
75.1.1.10. getDefaultCharset
-
getDefaultCharset()
@return CharsetAsciiExtended
75.1.1.11. readChar
-
readChar()
Read a single character from the console input
Parameters: | string|null – A list of allowed chars |
Return type: | string |
Throws : | ExceptionRuntimeException |