protected function ProjectServiceContainer::getInlinedService in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Tests/Fixtures/php/services9.php \ProjectServiceContainer::getInlinedService()
Gets the 'inlined' 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 value
File
- vendor/
symfony/ dependency-injection/ Tests/ Fixtures/ php/ services9.php, line 332
Class
- ProjectServiceContainer
- ProjectServiceContainer.
Code
protected function getInlinedService() {
$this->services['inlined'] = $instance = new \Bar();
$instance
->setBaz($this
->get('baz'));
$instance->pub = 'pub';
return $instance;
}