Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CompositeScanner.php
Go to the documentation of this file.
1 <?php
7 
9 {
13  protected $_children = [];
14 
22  public function addChild(ScannerInterface $scanner, $type)
23  {
24  $this->_children[$type] = $scanner;
25  }
26 
33  public function collectEntities(array $files)
34  {
35  $output = [];
36  foreach ($this->_children as $type => $scanner) {
37  if (!isset($files[$type]) || !is_array($files[$type])) {
38  continue;
39  }
40  $output[$type] = array_unique($scanner->collectEntities($files[$type]));
41  }
42  return $output;
43  }
44 }
$type
Definition: item.phtml:13
foreach($appDirs as $dir) $files