/** * */ public function parseConfig() { parent::parseConfig(); if (is_array($this->config['namespaces']) && !empty($this->config['namespaces'])) { $this->namespaces = array_merge($this->namespaces, $this->config['namespaces']); } }
/** * Add the parentClass option to have a default fallback class if specified class not found in the namespace * config * * @throws \InvalidArgumentException */ public function parseConfig() { parent::parseConfig(); if (empty($this->config['parentClass'])) { throw new \InvalidArgumentException("parentClass configuration option is required to use parent factory"); } $this->parentClass = $this->config['parentClass'] ?: null; $this->parentNamespace = $this->config['parentNamespace'] ?: $this->namespace; }