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

FileScanner.php

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