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 |
MagicSet.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 `__set` for remote objects
14 *
15 * @author Vincent Blanchon <blanchon.vincent@gmail.com>
16 * @license MIT
17 */
18 class MagicSet 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(
30 $originalClass,
31 '__set',
32 [new ParameterGenerator('name'), new ParameterGenerator('value')]
33 );
34
35 $this->setDocBlock('@param string \$name\n@param mixed \$value');
36 $this->setBody(
37 '$return = $this->' . $adapterProperty->getName() . '->call(' . var_export($originalClass->getName(), true)
38 . ', \'__set\', array($name, $value));' . "\n\n"
39 . 'return $return;'
40 );
41 }
42 }
43