Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 4939e5fc000ba7c3f5717aa64a847c19 > files > 19

php-zetacomponents-console-tools-1.7-2.mga7.noarch.rpm

<?php

require_once "Base/src/base.php";

function __autoload( $className )
{
    ezcBase::autoload( $className );
}

$out = new ezcConsoleOutput();

$opts = new ezcConsoleQuestionDialogOptions();
$opts->text = "Do you want to proceed?";
$opts->showResults = true;
$opts->validator = new ezcConsoleQuestionDialogCollectionValidator(
    array( "y", "n" ),
    "n",
    ezcConsoleQuestionDialogCollectionValidator::CONVERT_LOWER
);

$dialog = new ezcConsoleQuestionDialog( $out, $opts );

echo "The user decided to " . ( ezcConsoleDialogViewer::displayDialog( $dialog ) === "n" ? "not " : "" ) . "proceed.\n";

?>