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:
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// |
public static mixed |
displayDialog(
$dialog
)
Displays a dialog and returns a valid result from it. |
public static string |
readLine(
)
Returns a line from STDIN. |
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.
Name | Type | Description |
---|---|---|
$dialog |
ezcConsoleDialog | The dialog to display. |
Returns a line from STDIN.
The returned line is fully trimmed.
Type | Description |
---|---|
ezcConsoleDialogAbortException |
if the user closes STDIN using <CTRL>-D. |