Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Reader.php
Go to the documentation of this file.
1 <?php
7 
9 
13 class Reader implements ReaderInterface
14 {
18  private $readers;
19 
23  private $mapper;
24 
29  public function __construct(
30  Mapper $mapper,
31  $readers = []
32  ) {
33  $this->mapper = $mapper;
34  $this->readers = $readers;
35  }
36 
43  public function read($scope = null)
44  {
45  $data = [];
46  foreach ($this->readers as $reader) {
47  $data = array_merge_recursive($data, $reader->read($scope));
48  }
49 
50  return $this->mapper->execute($data);
51  }
52 }
__construct(Mapper $mapper, $readers=[])
Definition: Reader.php:29