|
| 1 | +<?php |
| 2 | + |
| 3 | +use Symfony\Component\DependencyInjection\ContainerInterface; |
| 4 | +use Symfony\Component\DependencyInjection\Container; |
| 5 | +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; |
| 6 | +use Symfony\Component\DependencyInjection\Exception\LogicException; |
| 7 | +use Symfony\Component\DependencyInjection\Exception\RuntimeException; |
| 8 | +use Symfony\Component\DependencyInjection\Reference; |
| 9 | +use Symfony\Component\DependencyInjection\Parameter; |
| 10 | +use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; |
| 11 | + |
| 12 | +/** |
| 13 | + * ProjectServiceContainer. |
| 14 | + * |
| 15 | + * This class has been auto-generated |
| 16 | + * by the Symfony Dependency Injection Component. |
| 17 | + */ |
| 18 | +class LazyServiceProjectServiceContainer extends Container |
| 19 | +{ |
| 20 | + /** |
| 21 | + * Constructor. |
| 22 | + */ |
| 23 | + public function __construct() |
| 24 | + { |
| 25 | + $this->services = array(); |
| 26 | + } |
| 27 | + |
| 28 | + /** |
| 29 | + * Gets the 'foo' service. |
| 30 | + * |
| 31 | + * This service is shared. |
| 32 | + * This method always returns the same instance of the service. |
| 33 | + * |
| 34 | + * @param bool $lazyLoad whether to try lazy-loading the service with a proxy |
| 35 | + * |
| 36 | + * @return stdClass A stdClass instance. |
| 37 | + */ |
| 38 | + public function getFooService($lazyLoad = true) |
| 39 | + { |
| 40 | + if ($lazyLoad) { |
| 41 | + $container = $this; |
| 42 | + |
| 43 | + return $this->services['foo'] = new stdClass_c1d194250ee2e2b7d2eab8b8212368a8( |
| 44 | + function (&$wrappedInstance, \ProxyManager\Proxy\LazyLoadingInterface $proxy) use ($container) { |
| 45 | + $wrappedInstance = $this->getFooService(false); |
| 46 | + |
| 47 | + $proxy->setProxyInitializer(null); |
| 48 | + |
| 49 | + return true; |
| 50 | + } |
| 51 | + ); |
| 52 | + } |
| 53 | + |
| 54 | + return new \stdClass(); |
| 55 | + } |
| 56 | +} |
| 57 | + |
| 58 | +class stdClass_c1d194250ee2e2b7d2eab8b8212368a8 extends \stdClass implements \ProxyManager\Proxy\LazyLoadingInterface, \ProxyManager\Proxy\ValueHolderInterface |
| 59 | +{ |
| 60 | + /** |
| 61 | + * @var \Closure|null initializer responsible for generating the wrapped object |
| 62 | + */ |
| 63 | + private $valueHolder5157dd96e88c0 = null; |
| 64 | + |
| 65 | + /** |
| 66 | + * @var \Closure|null initializer responsible for generating the wrapped object |
| 67 | + */ |
| 68 | + private $initializer5157dd96e8924 = null; |
| 69 | + |
| 70 | + /** |
| 71 | + * @override constructor for lazy initialization |
| 72 | + * |
| 73 | + *
F987
@param \Closure|null $initializer |
| 74 | + */ |
| 75 | + public function __construct($initializer) |
| 76 | + { |
| 77 | + $this->initializer5157dd96e8924 = $initializer; |
| 78 | + } |
| 79 | + |
| 80 | + /** |
| 81 | + * @param string $name |
| 82 | + */ |
| 83 | + public function __get($name) |
| 84 | + { |
| 85 | + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__get', array('name' => $name)); |
| 86 | + |
| 87 | + return $this->valueHolder5157dd96e88c0->$name; |
| 88 | + } |
| 89 | + |
| 90 | + /** |
| 91 | + * @param string $name |
| 92 | + * @param mixed $value |
| 93 | + */ |
| 94 | + public function __set($name, $value) |
| 95 | + { |
| 96 | + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__set', array('name' => $name, 'value' => $value)); |
| 97 | + |
| 98 | + $this->valueHolder5157dd96e88c0->$name = $value; |
| 99 | + } |
| 100 | + |
| 101 | + /** |
| 102 | + * @param string $name |
| 103 | + * |
| 104 | + * @return bool |
| 105 | + */ |
| 106 | + public function __isset($name) |
| 107 | + { |
| 108 | + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__isset', array('name' => $name)); |
| 109 | + |
| 110 | + return isset($this->valueHolder5157dd96e88c0->$name); |
| 111 | + } |
| 112 | + |
| 113 | + /** |
| 114 | + * @param string $name |
| 115 | + */ |
| 116 | + public function __unset($name) |
| 117 | + { |
| 118 | + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__unset', array('name' => $name)); |
| 119 | + |
| 120 | + unset($this->valueHolder5157dd96e88c0->$name); |
| 121 | + } |
| 122 | + |
| 123 | + /** |
| 124 | + * |
| 125 | + */ |
| 126 | + public function __clone() |
| 127 | + { |
| 128 | + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__clone', array()); |
| 129 | + |
| 130 | + $this->valueHolder5157dd96e88c0 = clone $this->valueHolder5157dd96e88c0; |
| 131 | + } |
| 132 | + |
| 133 | + /** |
| 134 | + * |
| 135 | + */ |
| 136 | + public function __sleep() |
| 137 | + { |
| 138 | + $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__sleep', array()); |
| 139 | + |
| 140 | + return array('valueHolder5157dd96e88c0'); |
| 141 | + } |
| 142 | + |
| 143 | + /** |
| 144 | + * |
| 145 | + */ |
| 146 | + public function __wakeup() |
| 147 | + { |
| 148 | + } |
| 149 | + |
| 150 | + /** |
| 151 | + * {@inheritdoc} |
| 152 | + */ |
| 153 | + public function setProxyInitializer(\Closure $initializer = null) |
| 154 | + { |
| 155 | + $this->initializer5157dd96e8924 = $initializer; |
| 156 | + } |
| 157 | + |
| 158 | + /** |
| 159 | + * {@inheritdoc} |
| 160 | + */ |
| 161 | + public function getProxyInitializer() |
| 162 | + { |
| 163 | + return $this->initializer5157dd96e8924; |
| 164 | + } |
| 165 | + |
| 166 | + /** |
| 167 | + * {@inheritdoc} |
| 168 | + */ |
| 169 | + public function initializeProxy() : bool |
| 170 | + { |
| 171 | + return $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, 'initializeProxy', array()); |
| 172 | + } |
| 173 | + |
| 174 | + /** |
| 175 | + * {@inheritdoc} |
| 176 | + */ |
| 177 | + public function isProxyInitialized() : bool |
| 178 | + { |
| 179 | + return null !== $this->valueHolder5157dd96e88c0; |
| 180 | + } |
| 181 | + |
| 182 | + /** |
| 183 | + * {@inheritdoc} |
| 184 | + */ |
| 185 | + public function getWrappedValueHolderValue() |
| 186 | + { |
| 187 | + return $this->valueHolder5157dd96e88c0; |
| 188 | + } |
| 189 | +} |
0 commit comments