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 |
MagicGet.php
01 <?php
02
03 declare(strict_types=1);
04
05 namespace ProxyManager\ProxyGenerator\RemoteObject\MethodGenerator;
06
07 use ProxyManager\Generator\MagicMethodGenerator;
08 use Zend\Code\Generator\ParameterGenerator;
09 use ReflectionClass;
10 use Zend\Code\Generator\PropertyGenerator;
11
12 /**
13 * Magic `__get` for remote objects
14 *
15 * @author Vincent Blanchon <blanchon.vincent@gmail.com>
16 * @license MIT
17 */
18 class MagicGet extends MagicMethodGenerator
19 {
20 /**
21 * Constructor
22 * @param ReflectionClass $originalClass
23 * @param \Zend\Code\Generator\PropertyGenerator $adapterProperty
24 *
25 * @throws \Zend\Code\Generator\Exception\InvalidArgumentException
26 */
27 public function __construct(ReflectionClass $originalClass, PropertyGenerator $adapterProperty)
28 {
29 parent::__construct($originalClass, '__get', [new ParameterGenerator('name')]);
30
31 $this->setDocBlock('@param string $name');
32 $this->setBody(
33 '$return = $this->' . $adapterProperty->getName() . '->call(' . var_export($originalClass->getName(), true)
34 . ', \'__get\', array($name));' . "\n\n" . 'return $return;'
35 );
36 }
37 }
38