[ 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\ProxyGenerator\LazyLoadingValueHolder\MethodGenerator; 6 7 use ProxyManager\Generator\MethodGenerator; 8 use Zend\Code\Generator\PropertyGenerator; 9 10 /** 11 * Implementation for {@see \ProxyManager\Proxy\LazyLoadingInterface::initializeProxy} 12 * for lazy loading value holder objects 13 * 14 * @author Marco Pivetta <ocramius@gmail.com> 15 * @license MIT 16 */ 17 class InitializeProxy extends MethodGenerator 18 { 19 /** 20 * Constructor 21 * 22 * @param PropertyGenerator $initializerProperty 23 * @param PropertyGenerator $valueHolderProperty 24 * 25 * @throws \Zend\Code\Generator\Exception\InvalidArgumentException 26 */ 27 public function __construct(PropertyGenerator $initializerProperty, PropertyGenerator $valueHolderProperty) 28 { 29 parent::__construct('initializeProxy'); 30 $this->setReturnType('bool'); 31 32 $initializer = $initializerProperty->getName(); 33 34 $this->setBody( 35 'return $this->' . $initializer . ' && $this->' . $initializer 36 . '->__invoke($this->' . $valueHolderProperty->getName() 37 . ', $this, \'initializeProxy\', array(), $this->' . $initializer . ');' 38 ); 39 } 40 }
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 |