Example #1
0
    //  set explict case sensitiveness
    $getopt->setOption('ignoreCase', false);
    //  Parse options
    $getopt->parse();
} catch (\Zend_Console_Getopt_Exception $exception) {
    echo $exception->getUsageMessage();
    exit(3);
}
//  Should the help or the usage be shown?
if (true === isset($getopt->u) or true === isset($getopt->h)) {
    echo Application::getUsage($getopt);
    exit(0);
}
//  Should the copyright statement be shown?
if (true === isset($getopt->c)) {
    echo Application::getCopyright();
    exit(0);
}
/**
 *  Gather the remaining arguments. There will be threaten as
 *  file names, which will be parsed.
 */
try {
    $files = $getopt->getRemainingArgs();
    /**
     *  @throws  Zend_Console_Getopt_Exception
     */
    if (sizeof($files) == 0) {
        throw new Zend_Console_Getopt_Exception('No files given');
    }
} catch (\Zend_Console_Getopt_Exception $exception) {