/** * @param ConfigFactory $configFactory */ public function __construct(ConfigFactory $configFactory) { $this->configFactory = $configFactory; $this->config = $this->configFactory->create(); $this->root = str_replace('\\', '/', $this->config->getMagentoBasePath()); foreach ($this->config->getMagentoFilePermissions() as $code => $config) { if (!$this->isAbsolute($config['path'])) { $this->directories[$code]['path'] = $this->makeAbsolute($config['path']); } } }
/** * Retrieve list of required directories * * @return array */ public function getRequired() { if (!$this->required) { foreach ($this->config->getMagentoFilePermissions() as $code => $config) { if (isset($config['path'])) { $this->required[$code] = $config['path']; } } } return array_values($this->required); }
/** * @param string $path * @return array|false */ protected function getFiles($path) { return Glob::glob($this->config->getMagentoBasePath() . $path); }