/** * Called by start and finish * * @param array $options array * * @static * @return void */ public static function reset($options = array()) { $options = array_merge(self::$defaults, $options); if (empty($options['done'])) { $options['done'] = 0; } if (empty($options['start'])) { $options['start'] = time(); } if (empty($options['total'])) { $options['total'] = 0; } self::$window = $options['window']; self::$done = $options['done']; self::$format = !self::$window ? $options['format'] : $options['ncursesFormat']; self::$message = CLIProgressBar::stripReturns($options['message']); self::$size = $options['size']; self::$start = $options['start']; self::$total = $options['total']; self::setWidth($options['width']); }