Version 1
[yaffs-website] / vendor / symfony / dependency-injection / Tests / Fixtures / php / services20.php
1 <?php
2
3 use Symfony\Component\DependencyInjection\ContainerInterface;
4 use Symfony\Component\DependencyInjection\Container;
5 use Symfony\Component\DependencyInjection\Exception\InactiveScopeException;
6 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
7 use Symfony\Component\DependencyInjection\Exception\LogicException;
8 use Symfony\Component\DependencyInjection\Exception\RuntimeException;
9 use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
10
11 /**
12  * ProjectServiceContainer.
13  *
14  * This class has been auto-generated
15  * by the Symfony Dependency Injection Component.
16  */
17 class ProjectServiceContainer extends Container
18 {
19     private $parameters;
20     private $targetDirs = array();
21
22     /**
23      * Constructor.
24      */
25     public function __construct()
26     {
27         parent::__construct();
28         $this->methodMap = array(
29             'depends_on_request' => 'getDependsOnRequestService',
30             'request' => 'getRequestService',
31         );
32     }
33
34     /**
35      * Gets the 'depends_on_request' service.
36      *
37      * This service is shared.
38      * This method always returns the same instance of the service.
39      *
40      * @return \stdClass A stdClass instance
41      */
42     protected function getDependsOnRequestService()
43     {
44         $this->services['depends_on_request'] = $instance = new \stdClass();
45
46         $instance->setRequest($this->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE));
47
48         return $instance;
49     }
50
51     /**
52      * Gets the 'request' service.
53      *
54      * This service is shared.
55      * This method always returns the same instance of the service.
56      *
57      * @return \Request A Request instance
58      */
59     protected function getRequestService()
60     {
61         return $this->services['request'] = new \Request();
62     }
63
64     /**
65      * Updates the 'request' service.
66      */
67     protected function synchronizeRequestService()
68     {
69         if ($this->initialized('depends_on_request')) {
70             $this->get('depends_on_request')->setRequest($this->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE));
71         }
72     }
73 }