Example #1
0
 public function option_verbose($k, $v)
 {
     static $verbose = 0;
     foreach ((array) $v as $i => $val) {
         foreach (explode("|", $val) as $const) {
             if (defined($const)) {
                 $verbose |= (int) constant($const);
             } elseif (is_numeric($const)) {
                 $verbose |= (int) $const;
             } elseif (empty($const)) {
                 $verbose = max($verbose, 1);
                 $verbose <<= 1;
             } else {
                 trigger_error("Unknown option passed to --{$k}, '{$const}'", E_USER_ERROR);
             }
         }
     }
     Config::set_verbose($verbose);
     error_reporting($GLOBALS['olderrrep'] | $verbose);
 }