Zend Framework  3.0
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Windows Class Reference

Public Member Functions

 getWidth ()
 Determine and return current console width.
 
 getHeight ()
 Determine and return current console height.
 
 isUtf8 ()
 Check if console is UTF-8 compatible.
 
 getTitle ()
 Return current console window title.
 
 setCharset (Charset\CharsetInterface $charset)
 Set Console charset to use.
 
 getCharset ()
 Get charset currently in use by this adapter.
 
 getDefaultCharset ()
 
 clear ()
 Clear console screen.
 
 clearLine ()
 Clear line at cursor position.
 
 readChar ($mask=null)
 Read a single character from the console input.
 
 readLine ($maxLength=2048)
 Read a single line from the console input.
 
- Public Member Functions inherited from Virtual
 getWidth ()
 Determine and return current console width.
 
 getHeight ()
 Determine and return current console height.
 
 isUtf8 ()
 Check if console is UTF-8 compatible.
 
 getTitle ()
 Return current console window title.
 
 setCharset (Charset\CharsetInterface $charset)
 Set Console charset to use.
 
 getCharset ()
 Get charset currently in use by this adapter.
 
 getDefaultCharset ()
 
- Public Member Functions inherited from AbstractAdapter
 write ($text, $color=null, $bgColor=null)
 Write a chunk of text to console.
 
 writeText ($text, $color=null, $bgColor=null)
 Alias for write()
 
 writeLine ($text="", $color=null, $bgColor=null)
 Write a single line of text to console and advance cursor to the next line.
 
 writeAt ($text, $x, $y, $color=null, $bgColor=null)
 Write a piece of text at the coordinates of $x and $y.
 
 writeBox ($x1, $y1, $x2, $y2, $lineStyle=self::LINE_SINGLE, $fillStyle=self::FILL_NONE, $color=null, $bgColor=null, $fillColor=null, $fillBgColor=null)
 Write a box at the specified coordinates.
 
 writeTextBlock ($text, $width, $height=null, $x=0, $y=0, $color=null, $bgColor=null)
 Write a block of text at the given coordinates, matching the supplied width and height.
 
 getWidth ()
 Determine and return current console width.
 
 getHeight ()
 Determine and return current console height.
 
 getSize ()
 Determine and return current console width and height.
 
 isUtf8 ()
 Check if console is UTF-8 compatible.
 
 setPos ($x, $y)
 Set cursor position.
 
 showCursor ()
 Show console cursor.
 
 hideCursor ()
 Hide console cursor.
 
 getTitle ()
 Return current console window title.
 
 colorize ($string, $color=null, $bgColor=null)
 Prepare a string that will be rendered in color.
 
 setColor ($color)
 Change current drawing color.
 
 setBgColor ($color)
 Change current drawing background color.
 
 resetColor ()
 Reset color to console default.
 
 setCharset (Charset\CharsetInterface $charset)
 Set Console charset to use.
 
 getCharset ()
 Get charset currently in use by this adapter.
 
 getDefaultCharset ()
 
 clear ()
 Clear console screen.
 
 clearLine ()
 Clear line at cursor position.
 
 clearScreen ()
 Clear console screen.
 
 readLine ($maxLength=2048)
 Read a single line from the console input.
 
 readChar ($mask=null)
 Read a single character from the console input.
 
 encodeText ($text)
 Encode a text to match console encoding.
 
- Public Member Functions inherited from AdapterInterface
 setCharset (CharsetInterface $charset)
 Set Console charset to use.
 

Protected Member Functions

 runProbeCommand ()
 Probe for system capabilities and cache results.
 
 runModeCommand ()
 Run and cache results of mode command.
 
 switchToUtf8 ()
 Switch to utf-8 encoding.
 
- Protected Member Functions inherited from Virtual
 runProbeCommand ()
 Run and store the results of mode command.
 
 switchToUtf8 ()
 Switch to UTF mode.
 

Protected Attributes

 $probeResult
 
 $modeResult
 
- Protected Attributes inherited from Virtual
 $modeResult
 
- Protected Attributes inherited from AbstractAdapter
 $charset
 
 $posX
 
 $posY
 

Static Protected Attributes

static $hasMBString
 
- Static Protected Attributes inherited from Virtual
static $hasMBString
 
- Static Protected Attributes inherited from AbstractAdapter
static $hasMBString
 

Additional Inherited Members

- Public Attributes inherited from AdapterInterface
const LINE_NONE = 1
 
const LINE_SINGLE = 2
 
const LINE_DOUBLE = 3
 
const LINE_BLOCK = 4
 
const FILL_NONE = 0
 
const FILL_SHADE_LIGHT = 1
 
const FILL_SHADE_MEDIUM = 2
 
const FILL_SHADE_DARK = 3
 
const FILL_BLOCK = 10
 

Member Function Documentation

clear ( )

Clear console screen.

Implements AdapterInterface.

clearLine ( )

Clear line at cursor position.

Implements AdapterInterface.

getCharset ( )

Get charset currently in use by this adapter.

Returns
Charset $charset

Implements AdapterInterface.

getDefaultCharset ( )
Returns
Charset

Implements AdapterInterface.

getHeight ( )

Determine and return current console height.

Returns
int

Implements AdapterInterface.

getTitle ( )

Return current console window title.

Returns
string

Implements AdapterInterface.

getWidth ( )

Determine and return current console width.

Returns
int

Implements AdapterInterface.

isUtf8 ( )

Check if console is UTF-8 compatible.

Returns
bool

Implements AdapterInterface.

readChar (   $mask = null)

Read a single character from the console input.

Parameters
string | null$maskA list of allowed chars
Exceptions
Exception\RuntimeException
Returns
string

Implements AdapterInterface.

readLine (   $maxLength = 2048)

Read a single line from the console input.

Parameters
int$maxLengthMaximum response length
Returns
string

Implements AdapterInterface.

runModeCommand ( )
protected

Run and cache results of mode command.

Returns
void
runProbeCommand ( )
protected

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.

Returns
void
setCharset ( Charset\CharsetInterface  $charset)

Set Console charset to use.

Parameters
Charset\CharsetInterface$charset
switchToUtf8 ( )
protected

Switch to utf-8 encoding.

Returns
void

Member Data Documentation

$hasMBString
staticprotected
$modeResult
protected
$probeResult
protected