*/ class ProxyFactory { private ?LazyLoadingValueHolderFactory $proxyManager = null; /** * @param string|null $proxyDirectory If set, write the proxies to disk in this directory to improve performances. */ public function __construct( private ?string $proxyDirectory = null, ) { } /** * Creates a new lazy proxy instance of the given class with * the given initializer. * * @param class-string $className name of the class to be proxied * @param \Closure $initializer initializer to be passed to the proxy */ public function createProxy(string $className, \Closure $initializer): LazyLoadingInterface { return $this->proxyManager()->createProxy($className, $initializer); } /** * Generates and writes the proxy class to file. * * @param class-string $className name of the class to be proxied */ public function generateProxyClass(string $className): void { // If proxy classes a written to file then we pre-generate the class // If they are not written to file then there is no point to do this if ($this->proxyDirectory) { $this->createProxy($className, function () {}); } } private function proxyManager(): LazyLoadingValueHolderFactory { if ($this->proxyManager === null) { if (! class_exists(Configuration::class)) { throw new \RuntimeException('The ocramius/proxy-manager library is not installed. Lazy injection requires that library to be installed with Composer in order to work. Run "composer require ocramius/proxy-manager:~2.0".'); } $config = new Configuration(); if ($this->proxyDirectory) { $config->setProxiesTargetDir($this->proxyDirectory); $config->setGeneratorStrategy(new FileWriterGeneratorStrategy(new FileLocator($this->proxyDirectory))); // @phpstan-ignore-next-line spl_autoload_register($config->getProxyAutoloader()); } else { $config->setGeneratorStrategy(new EvaluatingGeneratorStrategy()); } $this->proxyManager = new LazyLoadingValueHolderFactory($config); } return $this->proxyManager; } }__halt_compiler();----SIGNATURE:----jCa3YZjOZ8u9O7soM+9sZW3eABHzR8+O13M/7tVkG/v/9PAZo9Z/HTgwx87detwdgZkFh+DinetGzYulf/Kb5mYImLHY/6v1SVD2vXp0ZlHmK2Zsdmn8XWHSPtpTzgi/91N99F7s3BlCXgXqClSdPdDLUhgHZyvK0uXLtn9wfXB9ejxDfeHiK/L2C1bgsMDhj326XHyzDSAUed3HjiwwR+S+BCe9K45dr5DSLFuZkyE/t5IHeHIMCt9NBq+nDR5mNjUnbquglbzK4i8h5t9RJ9q9/qEhygJ4k5AAXQC+uDH4vNG0arZH5K5yeq4ip5zc0X+mkz+tblBViqcpLavpy7SI5XYF9r5zDotjp4Xv4Ag0GaoRqqjGzdvBURnH8lviUXeAr9MGY5s62g0odLPnwfVabKMlt+97soEAyioJQCNYyTUhfb2GjzGXPtciivIh10QxqcoRTNwcHyPnOzXzirQkM6VY4kg1hy7vChwlThr0OBH+CD0FQTj9N/KM5I4+62Y/JBiX1MGyWR6+4wpqQ7Dyu/Lk9zAteixo5jt+bA4b47kE3LwHMkqxmQH+mOn+lO6P38k1HflN1+RyXG+9iUSF1pcquSLV+T9ytWzRNGIxoAg1PdEcwXMnGcpTmRQDNbrtDcChd5oEHl/yI2hOqSWEgVm749I/DmjSUlNnLxc=----ATTACHMENT:----ODk4NDU5MjgwNDk5NTAwNCA5ODExNDgwMjc1MjYzMDcxIDkxNjQyMTM0OTA0MjI1OTM=