private function parseDefinition($id, $service) { $definition = new Definition($id); if (isset($service['synthetic'])) { $definition->setSynthetic($service['synthetic']); } if (isset($service['class'])) { $definition->setClass($service['class']); } if (isset($service['scope'])) { $definition->setScope($service['scope']); } if (isset($service['lazy'])) { $definition->setLazy($service['lazy']); } if (isset($service['arguments'])) { $definition->setArguments($service['arguments']); } if (isset($service['calls'])) { $definition->addCalls($service['calls']); } if (isset($service['configurator'])) { $definition->addConfigurator($service['configurator']); } if (isset($service['factory'])) { $definition->setFactory($service['factory']); } if (isset($service['tags'])) { $definition->setTags($service['tags']); } if (isset($service['aspects'])) { $definition->setAspects($service['aspects']); } return $definition; }