#!/usr/bin/php <?php # Include PEAR::Console_Getopt require_once 'Console/Getopt.php'; $command = new Command(); print_r($command->command()); $config = new Config(); $config->load($command->config()); $config->parse(); $config->cql_check_boolean("and"); $config->cql_check_boolean("notexist"); $config->cql_check_apt("cql", "all", "="); $config->cql_check_apt("cql", "all", "notexist"); $config->cql_check_apt("cql", "notexist", "="); $config->cql_check_apt("notexist", "all", "<>"); print "DONE\n"; exit(0); class Command { private $options; private $command; private $short_format_config = 'hc:s:t:'; private $syntax_config = array('ccl', 'cql', 'pqf'); public function __construct() { $args = Console_Getopt::readPHPArgv(); if (PEAR::isError($args)) { fwrite(STDERR, $args->getMessage() . "\n"); exit(1); } // Compatibility between "php script.php" and "./script.php"