get("type"); if ( ! class_exists($classname)) { throw new Exception\ServiceNotFound(sprintf('Service %s not found', $classname)); } try { $options = $configuration->get("options"); } catch (\Exception $e) { $options = array(); } return new $classname($app, $options); } }