[ Index ] |
PHP Cross Reference of phpBB-3.3.14-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 3 declare(strict_types=1); 4 5 namespace ProxyManager\Factory; 6 7 use ProxyManager\Proxy\VirtualProxyInterface; 8 use ProxyManager\ProxyGenerator\LazyLoadingValueHolderGenerator; 9 use ProxyManager\ProxyGenerator\ProxyGeneratorInterface; 10 11 /** 12 * Factory responsible of producing virtual proxy instances 13 * 14 * @author Marco Pivetta <ocramius@gmail.com> 15 * @license MIT 16 */ 17 class LazyLoadingValueHolderFactory extends AbstractBaseFactory 18 { 19 /** 20 * @var \ProxyManager\ProxyGenerator\LazyLoadingValueHolderGenerator|null 21 */ 22 private $generator; 23 24 public function createProxy( 25 string $className, 26 \Closure $initializer, 27 array $proxyOptions = [] 28 ) : VirtualProxyInterface { 29 $proxyClassName = $this->generateProxy($className, $proxyOptions); 30 31 return $proxyClassName::staticProxyConstructor($initializer); 32 } 33 34 /** 35 * {@inheritDoc} 36 */ 37 protected function getGenerator() : ProxyGeneratorInterface 38 { 39 return $this->generator ?: $this->generator = new LazyLoadingValueHolderGenerator(); 40 } 41 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Mon Nov 25 19:05:08 2024 | Cross-referenced by PHPXref 0.7.1 |