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 |
PublicPropertiesMap.php
01 <?php
02
03 declare(strict_types=1);
04
05 namespace ProxyManager\ProxyGenerator\PropertyGenerator;
06
07 use ProxyManager\Generator\Util\IdentifierSuffixer;
08 use ProxyManager\ProxyGenerator\Util\Properties;
09 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 }
48