Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

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

FileScanner.php

Zuletzt modifiziert: 02.04.2025, 15:03 - Dateigröße: 1.29 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-2016 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\Scanner;
11   
12  use Zend\Code\Annotation\AnnotationManager;
13  use Zend\Code\Exception;
14   
15  use function file_exists;
16  use function file_get_contents;
17  use function sprintf;
18  use function token_get_all;
19   
20  class FileScanner extends TokenArrayScanner implements ScannerInterface
21  {
22      /**
23       * @var string
24       */
25      protected $file;
26   
27      /**
28       * @param  string $file
29       * @param  null|AnnotationManager $annotationManager
30       * @throws Exception\InvalidArgumentException
31       */
32      public function __construct($file, AnnotationManager $annotationManager = null)
33      {
34          $this->file = $file;
35          if (! file_exists($file)) {
36              throw new Exception\InvalidArgumentException(sprintf(
37                  'File "%s" not found',
38                  $file
39              ));
40          }
41          parent::__construct(token_get_all(file_get_contents($file)), $annotationManager);
42      }
43   
44      /**
45       * @return string
46       */
47      public function getFile()
48      {
49          return $this->file;
50      }
51  }
52