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 
15 class Reader implements ReaderInterface
16 {
24  private $readers;
25 
29  private $mapper;
30 
35  public function __construct(
36  Mapper $mapper,
37  $readers = []
38  ) {
39  $this->readers = $readers;
40  $this->mapper = $mapper;
41  }
42 
49  public function read($scope = null)
50  {
51  $data = [];
52  foreach ($this->readers as $reader) {
53  $data = array_merge_recursive($data, $reader->read($scope));
54  }
55  return $this->mapper->execute($data);
56  }
57 }
__construct(Mapper $mapper, $readers=[])
Definition: Reader.php:35