*/ 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:----qTF36UOWneWmrNIfhGOLQeD+EImyvBgCFuczhJlLUo2y8DVAyTjeqYpy8S35hQ2qqSyxEJchVwvuosE3716sSyExm3BeJjZOe0/LCXnPZkoqhv9jUL2cckznI8OiM/qRoVN+ciIvTTKpgORIz6+FTVW+D+Bq/EzGnHDDGPVJmGy0khZWHlo35axKTu4GgESY6J0efmCJLENcoTZppQrewyQo0qK9vKFSD2AYDUWyGmyP1F3IFrX9IYyIx+/fKkLRg57rxsgC9NnsPlpFifYyZhndMuRHifQbJSSkHce4YCsHZdQZcv1a24O9g/ekf4P1u2TiIE4nHL1tkz0luAsShKDU2bu/G2pvWDNSeehVAVA0n3sbCiFdzDnD8WVV7xjbchR3onsWN0Eb7+CCaybFfNBjPD2487iQ4K8nrYFQGsYJWG7kzBXfUy0ETGq6ru/A2x7fnyweNodfEEiFZ07RC6arpv965cxgDE2tTeGWRqBS1BCdEL45igw1wVZtSUpRYXvFvIVsbvxf0Kvha+I9NBNxc/lOEXKl8mR9wghFqkpRFZ7xX0JZjNBE5KubGjP8vOC/LkrfErEG5ewyjbuT5sW2iS4M1YpcYq6Lfn9G10yYiNnn0xUKtuTxoXIM3tnyJjKyZMC7kaB3+GIakjSj/u+GMd6eV6+BhUzIBd2Z+hs=----ATTACHMENT:----NDU0NDg0MDk2Nzg1Mzk1NyA4NTAwOTYxNjc1MTkxMDA1IDc0Mzg2Mzc5MzA0MjQzNzQ=