protected function ProjectServiceContainer::getFooService

Gets the 'foo' service.

Return value

FooClass A FooClass instance.

File

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

Class

ProjectServiceContainer
ProjectServiceContainer

Code

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