public function __construct(TextWriter $writer = null, $total = 100, $size = 50, $showRemainingTime = true) { $this->textWriter = $writer; $this->size = $size; $this->showRemainingTime = $showRemainingTime; $this->start($total); }