Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
All Data Structures Namespaces Files Functions Variables Pages
ProgressFactory.php
Go to the documentation of this file.
1 <?php
8 
11 
16 {
23  public function createFromLog(WebLogger $logger)
24  {
25  $total = 1;
26  $current = 0;
27  $contents = implode('', $logger->get());
28  if (preg_match_all(Installer::PROGRESS_LOG_REGEX, $contents, $matches, PREG_SET_ORDER)) {
29  $last = array_pop($matches);
30  list(, $current, $total) = $last;
31  }
32  $progress = new Progress($total, $current);
33  return $progress;
34  }
35 }
$contents
Definition: website.php:14
$logger