@@ -28,12 +28,16 @@ public function __construct()
2828 'bar ' => 'getBarService ' ,
2929 'baz ' => 'getBazService ' ,
3030 'configurator_service ' => 'getConfiguratorServiceService ' ,
31+ 'configurator_service_simple ' => 'getConfiguratorServiceSimpleService ' ,
3132 'configured_service ' => 'getConfiguredServiceService ' ,
33+ 'configured_service_simple ' => 'getConfiguredServiceSimpleService ' ,
3234 'decorated ' => 'getDecoratedService ' ,
3335 'decorator_service ' => 'getDecoratorServiceService ' ,
3436 'decorator_service_with_name ' => 'getDecoratorServiceWithNameService ' ,
3537 'deprecated_service ' => 'getDeprecatedServiceService ' ,
3638 'factory_service ' => 'getFactoryServiceService ' ,
39+ 'factory_service_simple ' => 'getFactoryServiceSimpleService ' ,
40+ 'factory_simple ' => 'getFactorySimpleService ' ,
3741 'foo ' => 'getFooService ' ,
3842 'foo.baz ' => 'getFoo_BazService ' ,
3943 'foo_bar ' => 'getFooBarService ' ,
@@ -104,6 +108,23 @@ protected function getConfiguredServiceService()
104108 return $ instance ;
105109 }
106110
111+ /**
112+ * Gets the 'configured_service_simple' service.
113+ *
114+ * This service is shared.
115+ * This method always returns the same instance of the service.
116+ *
117+ * @return \stdClass A stdClass instance.
118+ */
119+ protected function getConfiguredServiceSimpleService ()
120+ {
121+ $ this ->services ['configured_service_simple ' ] = $ instance = new \stdClass ();
122+
123+ $ this ->get ('configurator_service_simple ' )->configureStdClass ($ instance );
124+
125+ return $ instance ;
126+ }
127+
107128 /**
108129 * Gets the 'decorated' service.
109130 *
@@ -173,6 +194,19 @@ protected function getFactoryServiceService()
173194 return $ this ->services ['factory_service ' ] = $ this ->get ('foo.baz ' )->getInstance ();
174195 }
175196
197+ /**
198+ * Gets the 'factory_service_simple' service.
199+ *
200+ * This service is shared.
201+ * This method always returns the same instance of the service.
202+ *
203+ * @return \Bar A Bar instance.
204+ */
205+ protected function getFactoryServiceSimpleService ()
206+ {
207+ return $ this ->services ['factory_service_simple ' ] = $ this ->get ('factory_simple ' )->getInstance ();
208+ }
209+
176210 /**
177211 * Gets the 'foo' service.
178212 *
@@ -334,6 +368,40 @@ protected function getConfiguratorServiceService()
334368 return $ instance ;
335369 }
336370
371+ /**
372+ * Gets the 'configurator_service_simple' service.
373+ *
374+ * This service is shared.
375+ * This method always returns the same instance of the service.
376+ *
377+ * This service is private.
378+ * If you want to be able to request this service from the container directly,
379+ * make it public, otherwise you might end up with broken code.
380+ *
381+ * @return \ConfClass A ConfClass instance.
382+ */
383+ protected function getConfiguratorServiceSimpleService ()
384+ {
385+ return $ this ->services ['configurator_service_simple ' ] = new \ConfClass ('bar ' );
386+ }
387+
388+ /**
389+ * Gets the 'factory_simple' service.
390+ *
391+ * This service is shared.
392+ * This method always returns the same instance of the service.
393+ *
394+ * This service is private.
395+ * If you want to be able to request this service from the container directly,
396+ * make it public, otherwise you might end up with broken code.
397+ *
398+ * @return \SimpleFactoryClass A SimpleFactoryClass instance.
399+ */
400+ protected function getFactorySimpleService ()
401+ {
402+ return $ this ->services ['factory_simple ' ] = new \SimpleFactoryClass ('foo ' );
403+ }
404+
337405 /**
338406 * Gets the 'inlined' service.
339407 *
0 commit comments