| Total Complexity | 3 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | class FileLocation |
||
| 30 | { |
||
| 31 | /** |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | protected $path; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @var string |
||
| 38 | */ |
||
| 39 | protected $filePath; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @var string |
||
| 43 | */ |
||
| 44 | protected $baseUrl; |
||
| 45 | |||
| 46 | public function __construct(string $path) |
||
| 47 | { |
||
| 48 | $this->path = $path; |
||
| 49 | $this->filePath = Environment::getPublicPath() . $path; |
||
| 50 | $this->baseUrl = GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST') |
||
| 51 | . PathUtility::getAbsoluteWebPath($this->filePath); |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | public function getFilePath(): string |
||
| 58 | { |
||
| 59 | return $this->filePath; |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return string |
||
| 64 | */ |
||
| 65 | public function getBaseUrl(): string |
||
| 68 | } |
||
| 69 | } |
||
| 70 |