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

installer_resources_locator.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.67 KiB


01  <?php
02  /**
03   *
04   * This file is part of the phpBB Forum Software package.
05   *
06   * @copyright (c) phpBB Limited <https://www.phpbb.com>
07   * @license       GNU General Public License, version 2 (GPL-2.0)
08   *
09   * For full copyright and license information, please see
10   * the docs/CREDITS.txt file.
11   *
12   */
13   
14  namespace phpbb\routing\resources_locator;
15   
16  use phpbb\filesystem\filesystem_interface;
17   
18  /**
19   * Locates the yaml routing resources taking update directories into consideration
20   */
21  class installer_resources_locator implements resources_locator_interface
22  {
23      /**
24       * phpBB's filesystem handler
25       *
26       * @var filesystem_interface
27       */
28      protected $filesystem;
29   
30      /**
31       * phpBB root path
32       *
33       * @var string
34       */
35      protected $phpbb_root_path;
36   
37      /**
38       * Name of the current environment
39       *
40       * @var string
41       */
42      protected $environment;
43   
44      /**
45       * Construct method
46       *
47       * @param filesystem_interface    $filesystem            phpBB's filesystem handler
48       * @param string                $phpbb_root_path    phpBB root path
49       * @param string                $environment        Name of the current environment
50       */
51      public function __construct(filesystem_interface $filesystem, $phpbb_root_path, $environment)
52      {
53          $this->filesystem            = $filesystem;
54          $this->phpbb_root_path        = $phpbb_root_path;
55          $this->environment            = $environment;
56      }
57   
58      /**
59       * {@inheritdoc}
60       */
61      public function locate_resources()
62      {
63          if ($this->filesystem->exists($this->phpbb_root_path . 'install/update/new/config'))
64          {
65              $resources = array(
66                  array('install/update/new/config/' . $this->environment . '/routing/environment.yml', 'yaml')
67              );
68          }
69          else
70          {
71              $resources = array(
72                  array('config/' . $this->environment . '/routing/environment.yml', 'yaml')
73              );
74          }
75   
76          return $resources;
77      }
78  }
79