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

AccessInterceptorScopeLocalizerFactory.php

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


 01  <?php
 02   
 03  declare(strict_types=1);
 04   
 05  namespace ProxyManager\Factory;
 06   
 07  use ProxyManager\Proxy\AccessInterceptorInterface;
 08  use ProxyManager\ProxyGenerator\AccessInterceptorScopeLocalizerGenerator;
 09  use ProxyManager\ProxyGenerator\ProxyGeneratorInterface;
 10  use ProxyManager\Signature\Exception\InvalidSignatureException;
 11  use ProxyManager\Signature\Exception\MissingSignatureException;
 12   
 13  /**
 14   * Factory responsible of producing proxy objects
 15   *
 16   * @author Marco Pivetta <ocramius@gmail.com>
 17   * @license MIT
 18   */
 19  class AccessInterceptorScopeLocalizerFactory extends AbstractBaseFactory
 20  {
 21      /**
 22       * @var \ProxyManager\ProxyGenerator\AccessInterceptorScopeLocalizerGenerator|null
 23       */
 24      private $generator;
 25   
 26      /**
 27       * @param object     $instance           the object to be localized within the access interceptor
 28       * @param \Closure[] $prefixInterceptors an array (indexed by method name) of interceptor closures to be called
 29       *                                       before method logic is executed
 30       * @param \Closure[] $suffixInterceptors an array (indexed by method name) of interceptor closures to be called
 31       *                                       after method logic is executed
 32       *
 33       * @throws InvalidSignatureException
 34       * @throws MissingSignatureException
 35       * @throws \OutOfBoundsException
 36       */
 37      public function createProxy(
 38          $instance,
 39          array $prefixInterceptors = [],
 40          array $suffixInterceptors = []
 41      ) : AccessInterceptorInterface {
 42          $proxyClassName = $this->generateProxy(get_class($instance));
 43   
 44          return $proxyClassName::staticProxyConstructor($instance, $prefixInterceptors, $suffixInterceptors);
 45      }
 46   
 47      /**
 48       * {@inheritDoc}
 49       */
 50      protected function getGenerator() : ProxyGeneratorInterface
 51      {
 52          return $this->generator ?: $this->generator = new AccessInterceptorScopeLocalizerGenerator();
 53      }
 54  }
 55