[ 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\PropertyGenerator; 6 7 use ProxyManager\Generator\Util\IdentifierSuffixer; 8 use ProxyManager\ProxyGenerator\Util\Properties; 9 use Zend\Code\Generator\PropertyGenerator; 10 11 /** 12 * Map of public properties that exist in the class being proxied 13 * 14 * @author Marco Pivetta <ocramius@gmail.com> 15 * @license MIT 16 */ 17 class PublicPropertiesMap extends PropertyGenerator 18 { 19 /** 20 * @var bool[] 21 */ 22 private $publicProperties = []; 23 24 /** 25 * @param Properties $properties 26 * 27 * @throws \Zend\Code\Generator\Exception\InvalidArgumentException 28 */ 29 public function __construct(Properties $properties) 30 { 31 parent::__construct(IdentifierSuffixer::getIdentifier('publicProperties')); 32 33 foreach ($properties->getPublicProperties() as $publicProperty) { 34 $this->publicProperties[$publicProperty->getName()] = true; 35 } 36 37 $this->setDefaultValue($this->publicProperties); 38 $this->setVisibility(self::VISIBILITY_PRIVATE); 39 $this->setStatic(true); 40 $this->setDocBlock('@var bool[] map of public properties of the parent class'); 41 } 42 43 public function isEmpty() : bool 44 { 45 return ! $this->publicProperties; 46 } 47 }
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 |