You are here

protected function ProjectServiceContainer::getServiceFromAnonymousFactoryService in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/dependency-injection/Tests/Fixtures/php/services19.php \ProjectServiceContainer::getServiceFromAnonymousFactoryService()

Gets the 'service_from_anonymous_factory' service.

This service is shared. This method always returns the same instance of the service.

Return value

\Bar\FooClass A Bar\FooClass instance.

File

vendor/symfony/dependency-injection/Tests/Fixtures/php/services19.php, line 42

Class

ProjectServiceContainer
ProjectServiceContainer.

Code

protected function getServiceFromAnonymousFactoryService() {
  return $this->services['service_from_anonymous_factory'] = call_user_func(array(
    new \Bar\FooClass(),
    'getInstance',
  ));
}