[ 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\RemoteObject\MethodGenerator; 6 7 use ProxyManager\Generator\MagicMethodGenerator; 8 use Zend\Code\Generator\ParameterGenerator; 9 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 }
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 |