/** * * @param DnaConfiguration $configurationFile * @return Nucleus */ public static function factory($configuration) { if ($configuration instanceof DnaConfiguration) { $dna = $configuration; } else { $dna = new DnaConfiguration(); $dna->setConfiguration($configuration); } return new static($dna); }
/** * @dataProvider provideTestAppend */ public function testAppend() { $arguments = func_get_args(); $expected = array_pop($arguments); $configuration = new DnaConfiguration(__DIR__); foreach ($arguments as $prependConfiguration) { $configuration->appendConfiguration($prependConfiguration); } $this->assertEquals($expected, $configuration->getConfiguration()); }
private function setDefaultConfiguration() { $defaultConfiguration = array(); $defaultConfiguration['services']['aspectKernel']['arguments'] = array($this->dnaConfiguration->getAspectConfiguration()); $defaultConfiguration['services']['configuration']['configuration']['generatedDirectory'] = $this->dnaConfiguration->getCachePath(); $this->configuration = array_deep_merge($defaultConfiguration, $this->configuration); }