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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
FileLocator.php
01 <?php
02
03 declare(strict_types=1);
04
05 namespace ProxyManager\FileLocator;
06
07 use ProxyManager\Exception\InvalidProxyDirectoryException;
08
09 /**
10 * {@inheritDoc}
11 *
12 * @author Marco Pivetta <ocramius@gmail.com>
13 * @license MIT
14 */
15 class FileLocator implements FileLocatorInterface
16 {
17 /**
18 * @var string
19 */
20 protected $proxiesDirectory;
21
22 /**
23 * @param string $proxiesDirectory
24 *
25 * @throws \ProxyManager\Exception\InvalidProxyDirectoryException
26 */
27 public function __construct(string $proxiesDirectory)
28 {
29 $absolutePath = realpath($proxiesDirectory);
30
31 if (false === $absolutePath) {
32 throw InvalidProxyDirectoryException::proxyDirectoryNotFound($proxiesDirectory);
33 }
34
35 $this->proxiesDirectory = $absolutePath;
36 }
37
38 /**
39 * {@inheritDoc}
40 */
41 public function getProxyFileName(string $className) : string
42 {
43 return $this->proxiesDirectory . DIRECTORY_SEPARATOR . str_replace('\\', '', $className) . '.php';
44 }
45 }
46