/** * Gets the 'configured_service' service. * * This service is shared. * This method always returns the same instance of the service. * * @return \stdClass A stdClass instance */ protected function getConfiguredServiceService() { $a = new \ConfClass(); $a->setFoo($this->get('baz')); $this->services['configured_service'] = $instance = new \stdClass(); $a->configureStdClass($instance); return $instance; }
/** * Gets the 'configurator_service' service. * * This service is shared. * This method always returns the same instance of the service. * * This service is private. * If you want to be able to request this service from the container directly, * make it public, otherwise you might end up with broken code. * * @return \ConfClass A ConfClass instance. */ protected function getConfiguratorServiceService() { $this->services['configurator_service'] = $instance = new \ConfClass(); $instance->setFoo($this->get('baz')); return $instance; }