Files
Central/src/Service/AppPathResolver.php
tristan 419d3b24cb
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
fix : ajout d'un préfix pour les path des app et correction de l'affichage
2026-04-07 10:30:58 +02:00

21 lines
431 B
PHP

<?php
declare(strict_types=1);
namespace App\Service;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
final readonly class AppPathResolver
{
public function __construct(
#[Autowire('%env(APPS_BASE_PATH)%')]
private string $basePath,
) {}
public function resolve(string $relativePath): string
{
return rtrim($this->basePath, '/') . '/' . ltrim($relativePath, '/');
}
}