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); } }
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); }
public function err($message, $numberOfNewLines = 1, $verbosityLevel = Writer::VERBOSITY_NORMAL) { $this->_stderr->writeMessage($message, $numberOfNewLines, $verbosityLevel); }