Elgg  Version 5.1
Progress.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Cli;
4 
7 
11 class Progress {
12 
16  protected $output;
17 
23  public function __construct(OutputInterface $output) {
24  $this->output = $output;
25  }
26 
35  public function start($process, $max = 0) {
36  $this->output->writeln($process);
37 
38  return new ProgressBar($this->output, $max);
39  }
40 
47  public function finish(ProgressBar $progress) {
48  $progress->finish();
49  $this->output->writeln('');
50  }
51 }
finish(ProgressBar $progress)
Finish a process.
Definition: Progress.php:47
CLI Progress reporter.
Definition: Progress.php:11
start($process, $max=0)
Start a new process.
Definition: Progress.php:35
$max
Definition: time.php:37
__construct(OutputInterface $output)
Constructor.
Definition: Progress.php:23