Esempio n. 1
0
 public function start()
 {
     if ($this->_currentSequenceId == sizeof($this->_charSequence)) {
         $this->_currentSequenceId = 0;
     }
     $char = $this->_charSequence[$this->_currentSequenceId];
     $this->_output->writeMessage(Writer::ANSI_CLEAR_LINE . $this->_loaderText . $char, 1, Writer::CR);
     $this->_currentSequenceId++;
 }
 public function increment()
 {
     $this->_current++;
     $this->_calculatePercent();
     $this->_calculateBarWidth();
     $fill = $this->_fillMask() . ' ' . $this->_generateBar();
     if ($this->_current == $this->_size) {
         $this->_output->writeMessage($fill);
     } else {
         $this->_output->writeMessage($fill, 1, Writer::CR);
     }
 }
Esempio n. 3
0
 private function _renderDataRow($row)
 {
     if (empty($row)) {
         return;
     }
     $line = '|';
     foreach ($row as $column => $name) {
         $columnWidth = $this->_getColumnWidth($column);
         $spaces = $columnWidth - strlen($name) - 1;
         $line .= ' ' . $name . str_repeat(' ', $spaces) . '|';
     }
     $this->_output->writeMessage($line);
 }
Esempio n. 4
0
 public function err($message, $numberOfNewLines = 1, $verbosityLevel = Writer::VERBOSITY_NORMAL)
 {
     $this->_stderr->writeMessage($message, $numberOfNewLines, $verbosityLevel);
 }