Elgg  Version master
Progress.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Cli;
4 
7 
11 class Progress {
12 
18  public function __construct(protected OutputInterface $output) {
19  }
20 
29  public function start($process, $max = 0) {
30  $this->output->writeln($process);
31 
32  return new ProgressBar($this->output, $max);
33  }
34 
41  public function finish(ProgressBar $progress) {
42  $progress->finish();
43  $this->output->writeln('');
44  }
45 }
finish(ProgressBar $progress)
Finish a process.
Definition: Progress.php:41
CLI Progress reporter.
Definition: Progress.php:11
__construct(protected OutputInterface $output)
Constructor.
Definition: Progress.php:18
start($process, $max=0)
Start a new process.
Definition: Progress.php:29
$max
Definition: time.php:37
$output
Definition: download.php:9