Ejemplo n.º 1
0
 private function statusbar($str, $in = false)
 {
     static $lines = false;
     if (!$lines) {
         $lines = array_fill(0, self::OUTPUT_ROWS, array('str' => '', 'in' => ''));
     }
     $lines[] = array('str' => $str, 'in' => $in);
     array_shift($lines);
     echo "7";
     foreach ($lines as $line) {
         $text = str_pad(substr(($line['in'] ? ' <  ' : ' >  ') . $line['str'], 0, Misc::cols()), Misc::cols());
         if ($line['in']) {
             echo Style::red($text, 'light_gray');
         } else {
             echo Style::black($text, 'light_gray');
         }
     }
     echo str_repeat('─', Misc::cols());
     echo "8";
 }
Ejemplo n.º 2
0
 public function dropError($text, $code = 1, $additional = false)
 {
     Output::string($this->getScript() . ": " . Style::red($text) . PHP_EOL . ($additional ? $additional . PHP_EOL : ''));
     die($code);
 }