Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

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

FileGeneratorRegistry.php

Zuletzt modifiziert: 09.10.2024, 12:57 - Dateigröße: 1.33 KiB


01  <?php
02  /**
03   * Zend Framework (http://framework.zend.com/)
04   *
05   * @link      http://github.com/zendframework/zf2 for the canonical source repository
06   * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
07   * @license   http://framework.zend.com/license/new-bsd New BSD License
08   */
09   
10  namespace Zend\Code\Generator;
11   
12  use Zend\Code\Generator\Exception\RuntimeException;
13   
14  class FileGeneratorRegistry
15  {
16      /**
17       * @var array $fileCodeGenerators
18       */
19      private static $fileCodeGenerators = array();
20   
21      /**
22       * Registry for the Zend\Code package.
23       *
24       * @param  FileGenerator $fileCodeGenerator
25       * @param  string $fileName
26       * @throws RuntimeException
27       */
28      public static function registerFileCodeGenerator(FileGenerator $fileCodeGenerator, $fileName = null)
29      {
30          if ($fileName === null) {
31              $fileName = $fileCodeGenerator->getFilename();
32          }
33   
34          if ($fileName == '') {
35              throw new RuntimeException('FileName does not exist.');
36          }
37   
38          // cannot use realpath since the file might not exist, but we do need to have the index
39          // in the same DIRECTORY_SEPARATOR that realpath would use:
40          $fileName = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $fileName);
41   
42          static::$fileCodeGenerators[$fileName] = $fileCodeGenerator;
43      }
44  }
45