Apache Zeta Components - high quality PHP components

Apache Zeta Components Manual :: Docs For Class ezcConsoleDialogViewer

ConsoleTools::ezcConsoleDialogViewer

Class ezcConsoleDialogViewer

Utility class for ezcConsoleDialog implementations.

This class contains utility methods for working with ezcConsoleDialog implementations.

To display a dialog in a loop until a valid result is received do:

  1.  // Instatiate dialog in $dialog ...

For implementing a custom dialog, the method readLine() method can be used to read a line of input from the user.

Source for this file: /ConsoleTools/src/dialog_viewer.php

Version:   //autogen//

Method Summary

public static mixed displayDialog( $dialog )
Displays a dialog and returns a valid result from it.
public static string readLine( )
Returns a line from STDIN.

Methods

displayDialog

static mixed displayDialog( ezcConsoleDialog $dialog )

Displays a dialog and returns a valid result from it.

This methods displays a dialog in a loop, until it received a valid result from it and returns this result.

Parameters:
Name Type Description
$dialog ezcConsoleDialog The dialog to display.

readLine

static string readLine( )

Returns a line from STDIN.

The returned line is fully trimmed.

Exceptions:
Type Description
ezcConsoleDialogAbortException if the user closes STDIN using <CTRL>-D.
Documentation generated by phpDocumentor 1.4.3