protected function ProjectServiceContainer::getFooService

Gets the 'foo' service.

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

Return value

FooClass A FooClass instance.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php, line 126

Class

ProjectServiceContainer
ProjectServiceContainer

Code

protected function getFooService() {
  $a = $this
    ->get('foo.baz');
  $this->services['foo'] = $instance = call_user_func(array(
    'FooClass',
    'getInstance',
  ), 'foo', $a, array(
    'bar' => 'foo is bar',
    'foobar' => 'bar',
  ), true, $this);
  $instance
    ->setBar($this
    ->get('bar'));
  $instance
    ->initialize();
  $instance->foo = 'bar';
  $instance->moo = $a;
  sc_configure($instance);
  return $instance;
}