50.1. Zend\Console\Adapter\Posix
@todo Add GNU readline support
50.1.1. Methods
50.1.1.1. getWidth
-
getWidth()
Determine and return current console width.
50.1.1.2. getHeight
-
getHeight()
Determine and return current console height.
50.1.1.3. runModeCommand
-
runModeCommand()
Run a mode command and store results
50.1.1.4. isUtf8
-
isUtf8()
Check if console is UTF-8 compatible
50.1.1.5. showCursor
-
showCursor()
Show console cursor
50.1.1.6. hideCursor
-
hideCursor()
Hide console cursor
50.1.1.7. setPos
-
setPos()
Set cursor position
50.1.1.8. colorize
-
colorize()
Prepare a string that will be rendered in color.
Parameters: |
- string –
- int –
- null|int –
|
Throws ExceptionBadMethodCallException: |
| |
Return type: | string
|
50.1.1.9. setColor
-
setColor()
Change current drawing color.
Parameters: | int – |
Throws ExceptionBadMethodCallException: |
| |
50.1.1.10. setBgColor
-
setBgColor()
Change current drawing background color
Parameters: | int – |
Throws ExceptionBadMethodCallException: |
| |
50.1.1.11. resetColor
-
resetColor()
Reset color to console default.
50.1.1.12. getTitle
-
getTitle()
Return current console window title.
50.1.1.13. setCharset
-
setCharset()
Set Console charset to use.
Parameters: | CharsetCharsetInterface – |
50.1.1.14. getCharset
-
getCharset()
Get charset currently in use by this adapter.
Return type: | CharsetCharsetInterface $charset |
50.1.1.15. getDefaultCharset
-
getDefaultCharset()
@return CharsetCharsetInterface
50.1.1.16. readChar
-
readChar()
Read a single character from the console input
Parameters: | string|null – A list of allowed chars |
Return type: | string |
50.1.1.17. clear
-
clear()
Reset color to console default.
50.1.1.18. restoreTTYMode
-
restoreTTYMode()
Restore TTY (Console) mode to previous value.
50.1.1.19. setTTYMode
-
setTTYMode()
Change TTY (Console) mode
50.1.1.20. getColorCode
-
getColorCode()
Get the final color code and throw exception on error
Parameters: | null|int|Xterm256 – |
Throws ExceptionBadMethodCallException: |
| |
Return type: | string |