service = static::create($name, $configuration, $dependencies, $namespace); } /** * * @return ServiceAbstract */ public function buildService() { return $this->service; } public static function create($name, ParameterBag $configuration, Array $dependencies = array(), $namespace = null) { throw new \Exception("Abstract factory does not create any concrete Service"); } protected static function getServiceOptions($type, ParameterBag $configuration) { if(!in_array($type, static::$optionsNotMandatory)) { $options = $configuration->get("options"); } else { try { $options = $configuration->get("options"); } catch(\Exception $e) { $options = array(); } } return $options; } }