• File: tutorial_example_04_input_basic.php
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/cloudlinux/alt-php55/root/usr/share/doc/pear/ConsoleTools/docs/tutorial_example_04_input_basic.php
  • Date Modified: 01/23/2015 11:16 PM
  • File size: 399 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

require_once 'tutorial_autoload.php';

$input = new ezcConsoleInput();

$helpOption = $input->registerOption( 
    new ezcConsoleOption( 
        'h',
        'help'
    )
);

try
{
    $input->process();
}
catch ( ezcConsoleOptionException $e )
{
    die( $e->getMessage() );
}

if ( $helpOption->value !== false )
{
    echo "Help requested.";
}
else
{
    echo "No help requested.";
}

?>