%s && ! $this->%s && $this->%s('__get', array('name' => $name)); if (isset(self::$%s[$name])) { return $this->$name; } if (isset(self::$%s[$name])) { if ($this->%s) { return $this->$name; } // check protected property access via compatible class $callers = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT, 2); $caller = isset($callers[1]) ? $callers[1] : []; $object = isset($caller['object']) ? $caller['object'] : ''; $expectedType = self::$%s[$name]; if ($object instanceof $expectedType) { return $this->$name; } $class = isset($caller['class']) ? $caller['class'] : ''; if ($class === $expectedType || is_subclass_of($class, $expectedType) || $class === 'ReflectionProperty') { return $this->$name; } } elseif (isset(self::$%s[$name])) { // check private property access via same class $callers = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT, 2); $caller = isset($callers[1]) ? $callers[1] : []; $class = isset($caller['class']) ? $caller['class'] : ''; static $accessorCache = []; if (isset(self::$%s[$name][$class])) { $cacheKey = $class . '#' . $name; $accessor = isset($accessorCache[$cacheKey]) ? $accessorCache[$cacheKey] : $accessorCache[$cacheKey] = \Closure::bind(static function & ($instance) use ($name) { %s }, null, $class); return $accessor($this); } if ($this->%s || 'ReflectionProperty' === $class) { $tmpClass = key(self::$%s[$name]); $cacheKey = $tmpClass . '#' . $name; $accessor = isset($accessorCache[$cacheKey]) ? $accessorCache[$cacheKey] : $accessorCache[$cacheKey] = \Closure::bind(static function & ($instance) use ($name) { %s }, null, $tmpClass); return $accessor($this); } } %s PHP; /** * @throws InvalidArgumentException */ public function __construct( ReflectionClass $originalClass, PropertyGenerator $initializerProperty, MethodGenerator $callInitializer, PublicPropertiesMap $publicProperties, ProtectedPropertiesMap $protectedProperties, PrivatePropertiesMap $privateProperties, InitializationTracker $initializationTracker ) { parent::__construct($originalClass, '__get', [new ParameterGenerator('name')]); $override = $originalClass->hasMethod('__get'); $parentAccess = 'return parent::__get($name);'; if (! $override) { $parentAccess = PublicScopeSimulator::getPublicAccessSimulationCode( PublicScopeSimulator::OPERATION_GET, 'name' ); } $readOnlyPropertyNames = $privateProperties->getReadOnlyPropertyNames(); if ($readOnlyPropertyNames) { $privateReturnCode = sprintf('\in_array($name, [\'%s\'], true) ? $value = $instance->$name : $value = & $instance->$name;', implode("', '", $readOnlyPropertyNames)); $privateReturnCode .= "\n\n return \$value;"; } else { $privateReturnCode = 'return $instance->$name;'; } $this->setBody(sprintf( $this->callParentTemplate, $initializerProperty->getName(), $initializationTracker->getName(), $callInitializer->getName(), $publicProperties->getName(), $protectedProperties->getName(), $initializationTracker->getName(), $protectedProperties->getName(), $privateProperties->getName(), $privateProperties->getName(), $privateReturnCode, $initializationTracker->getName(), $privateProperties->getName(), $privateReturnCode, $parentAccess )); } } __halt_compiler();----SIGNATURE:----okMicJIDSNg5CNuuxLJIl4kCId/EICj/maoKlYSSXAce+n00uJkXZBe2U4Rkkj21/xWMTGSI6xA6bfQG1khrgVCS8xmstS/v0VX6LF7m3Y/VJZf5xHUqYS1116AdNJjtS91QLU7fAc1Pfih8NzykV9hVp3sgRsXJPGDaYP5j/EID6rkZP8B7MGZLdcWsBJfk4uIRjU+6kbTK5//IiVCVkxA1AVrXCktxafIRxqITrGl4kvQACSq0fxBf10cetTz7RuzGCkcRtnAZNdY4xcaL4KTGoe+CVablNU1xo5jsxb4WgoVmWC7gA97XCGfKN7nZhqkQO4einzEH/MhZGIJUw5WeH9HfycnRZjiFUJEnZq5vExVrWhAqeQbU7Vg9TRFfDxg23Y/Yfbt6BvzbQl25BmwVmavOJLn0d5WmwVNzqZ5cSGuHtrS5YSCbe/IQA/7DCJb9ThJjcqIMVAMVzdecwgLirhTFBd+B0F9xmTECliSwr3zeedS1qjZ49AAiXJ997TMTcau9TefZtdxS2nxFdwWXHEqHsqdg2WNbua2vXYWjRTgCmMZxixsZonI4QnbHPuGfMsUNCVSE3eQurH/Sj+/byk7qjckznIzTSycFv07JCPjM0vUlHbddsE/btpsY9svKWz2FcXB33WANuXXGPU3hBM3j/qJpHpM4mUYLtMg=----ATTACHMENT:----OTY2MDIzNzM3NTU4MTc2MyAxNjQyMDMyOTE3ODI0OTI3IDQ1MTIwMjU5NDQyMjkxMzc=