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 |
MagicUnset.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 `__unset` method for remote objects
14 *
15 * @author Vincent Blanchon <blanchon.vincent@gmail.com>
16 * @license MIT
17 */
18 class MagicUnset extends MagicMethodGenerator
19 {
20 /**
21 * Constructor
22 *
23 * @param ReflectionClass $originalClass
24 * @param PropertyGenerator $adapterProperty
25 *
26 * @throws \Zend\Code\Generator\Exception\InvalidArgumentException
27 */
28 public function __construct(ReflectionClass $originalClass, PropertyGenerator $adapterProperty)
29 {
30 parent::__construct($originalClass, '__unset', [new ParameterGenerator('name')]);
31
32 $this->setDocBlock('@param string $name');
33 $this->setBody(
34 '$return = $this->' . $adapterProperty->getName() . '->call(' . var_export($originalClass->getName(), true)
35 . ', \'__unset\', array($name));' . "\n\n"
36 . 'return $return;'
37 );
38 }
39 }
40