You are here

protected function ProjectServiceContainer::getTestService in Service Container 7.2

Same name in this branch
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php \ProjectServiceContainer::getTestService()
  2. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php \ProjectServiceContainer::getTestService()
Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php \ProjectServiceContainer::getTestService()
  2. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php \ProjectServiceContainer::getTestService()

Gets the 'test' service.

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

Return value

\stdClass A stdClass instance.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php, line 57

Class

ProjectServiceContainer
ProjectServiceContainer.

Code

protected function getTestService() {
  return $this->services['test'] = new \stdClass(array(
    'only dot' => '.',
    'concatenation as value' => '.\'\'.',
    'concatenation from the start value' => '\'\'.',
    '.' => 'dot as a key',
    '.\'\'.' => 'concatenation as a key',
    '\'\'.' => 'concatenation from the start key',
    'optimize concatenation' => 'string1-string2',
    'optimize concatenation with empty string' => 'string1string2',
    'optimize concatenation from the start' => 'start',
    'optimize concatenation at the end' => 'end',
  ));
}