/** * @param string $path * @return $this * @throws \Symfony\Component\Yaml\Exception\ParseException * @throws \Exception */ public function load($path) { $services = $this->cache->get($path); if (null === $services) { $services = $this->parser->parseServices(Yaml::parse($path)); $this->cache->set($path, $services); } $this->services = array_merge($this->services, $services); return $this; }
/** * @param string $file */ public function load($file) { $config = $this->cache->get($file); if (null === $config) { $config = $this->factory->buildFromPath($file); $this->cache->set($file, $config->toArray()); } else { $config = new Config($config); } if ($config) { $this->config->merge($config); } return $this; }