You are here

class ProjectServiceContainer in Service Container 7.2

Same name in this branch
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ContainerTest.php \Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer
  2. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php \ProjectServiceContainer
  3. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php \ProjectServiceContainer
  4. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php \ProjectServiceContainer
  5. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services20.php \ProjectServiceContainer
  6. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php \ProjectServiceContainer
  7. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php \ProjectServiceContainer
  8. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php \ProjectServiceContainer
  9. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php \ProjectServiceContainer
Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ContainerTest.php \Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer

Hierarchy

  • class \Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Container

Expanded class hierarchy of ProjectServiceContainer

1 string reference to 'ProjectServiceContainer'
PhpDumper::dump in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Dumps the service container as a PHP class.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ContainerTest.php, line 629

Namespace

Symfony\Component\DependencyInjection\Tests
View source
class ProjectServiceContainer extends Container {
  public $__bar, $__foo_bar, $__foo_baz;
  public $synchronized;
  public function __construct() {
    parent::__construct();
    $this->__bar = new \stdClass();
    $this->__foo_bar = new \stdClass();
    $this->__foo_baz = new \stdClass();
    $this->synchronized = false;
    $this->aliases = array(
      'alias' => 'bar',
    );
  }
  protected function getScopedService() {
    if (!$this
      ->isScopeActive('foo')) {
      throw new \RuntimeException('Invalid call');
    }
    return $this->services['scoped'] = $this->scopedServices['foo']['scoped'] = new \stdClass();
  }
  protected function getScopedFooService() {
    if (!$this
      ->isScopeActive('foo')) {
      throw new \RuntimeException('invalid call');
    }
    return $this->services['scoped_foo'] = $this->scopedServices['foo']['scoped_foo'] = new \stdClass();
  }
  protected function getScopedSynchronizedFooService() {
    if (!$this
      ->isScopeActive('foo')) {
      throw new \RuntimeException('invalid call');
    }
    return $this->services['scoped_bar'] = $this->scopedServices['foo']['scoped_bar'] = new \stdClass();
  }
  protected function synchronizeScopedSynchronizedFooService() {
    $this->synchronized = true;
  }
  protected function getInactiveService() {
    throw new InactiveScopeException('request', 'request');
  }
  protected function getBarService() {
    return $this->__bar;
  }
  protected function getFooBarService() {
    return $this->__foo_bar;
  }
  protected function getFoo_BazService() {
    return $this->__foo_baz;
  }
  protected function getCircularService() {
    return $this
      ->get('circular');
  }
  protected function getThrowExceptionService() {
    throw new \Exception('Something went terribly wrong!');
  }
  protected function getThrowsExceptionOnServiceConfigurationService() {
    $this->services['throws_exception_on_service_configuration'] = $instance = new \stdClass();
    throw new \Exception('Something was terribly wrong while trying to configure the service!');
  }

}

Members