Verzeichnisstruktur phpBB-3.3.16


Veröffentlicht
27.04.2026

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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

MagicGet.php

Zuletzt modifiziert: 01.05.2026, 11:28 - Dateigröße: 1.81 KiB


 01  <?php
 02   
 03  declare(strict_types=1);
 04   
 05  namespace ProxyManager\ProxyGenerator\AccessInterceptorScopeLocalizer\MethodGenerator;
 06   
 07  use ProxyManager\Generator\MagicMethodGenerator;
 08  use ProxyManager\ProxyGenerator\Util\GetMethodIfExists;
 09  use Zend\Code\Generator\ParameterGenerator;
 10  use ProxyManager\ProxyGenerator\AccessInterceptorScopeLocalizer\MethodGenerator\Util\InterceptorGenerator;
 11  use ProxyManager\ProxyGenerator\Util\PublicScopeSimulator;
 12  use ReflectionClass;
 13  use Zend\Code\Generator\PropertyGenerator;
 14   
 15  /**
 16   * Magic `__get` for lazy loading ghost objects
 17   *
 18   * @author Marco Pivetta <ocramius@gmail.com>
 19   * @license MIT
 20   */
 21  class MagicGet extends MagicMethodGenerator
 22  {
 23      /**
 24       * @param ReflectionClass   $originalClass
 25       * @param PropertyGenerator $prefixInterceptors
 26       * @param PropertyGenerator $suffixInterceptors
 27       *
 28       * @throws \Zend\Code\Generator\Exception\InvalidArgumentException
 29       * @throws \InvalidArgumentException
 30       */
 31      public function __construct(
 32          ReflectionClass $originalClass,
 33          PropertyGenerator $prefixInterceptors,
 34          PropertyGenerator $suffixInterceptors
 35      ) {
 36          parent::__construct($originalClass, '__get', [new ParameterGenerator('name')]);
 37   
 38          $parent = GetMethodIfExists::get($originalClass, '__get');
 39   
 40          $callParent = '$returnValue = & parent::__get($name);';
 41   
 42          if (! $parent) {
 43              $callParent = PublicScopeSimulator::getPublicAccessSimulationCode(
 44                  PublicScopeSimulator::OPERATION_GET,
 45                  'name',
 46                  null,
 47                  null,
 48                  'returnValue'
 49              );
 50          }
 51   
 52          $this->setBody(InterceptorGenerator::createInterceptedMethodBody(
 53              $callParent,
 54              $this,
 55              $prefixInterceptors,
 56              $suffixInterceptors,
 57              $parent
 58          ));
 59      }
 60  }
 61