You are here

protected function ProjectServiceContainer::getDependsOnRequestService in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Tests/Fixtures/php/services20.php \ProjectServiceContainer::getDependsOnRequestService()

Gets the 'depends_on_request' service.

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

Return value

\stdClass A stdClass instance.

File

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

Class

ProjectServiceContainer
ProjectServiceContainer.

Code

protected function getDependsOnRequestService() {
  $this->services['depends_on_request'] = $instance = new \stdClass();
  $instance
    ->setRequest($this
    ->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE));
  return $instance;
}