Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
LazyLoadingValueHolderFactory.php
01 <?php
02
03 declare(strict_types=1);
04
05 namespace ProxyManager\Factory;
06
07 use ProxyManager\Proxy\VirtualProxyInterface;
08 use ProxyManager\ProxyGenerator\LazyLoadingValueHolderGenerator;
09 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 }
42