Provides a way to override cache and log folders form the ENV

This commit is contained in:
Sébastien Morel 2020-06-05 10:07:10 -07:00 committed by Morel Sébastien
parent bdc583cf0e
commit 5fa5d36153
No known key found for this signature in database
GPG Key ID: FFF7C4EB6FEDB154

View File

@ -63,6 +63,22 @@ trait MicroKernelTrait
*/
//abstract protected function configureContainer(ContainerConfigurator $c): void;
/**
* {@inheritdoc}
*/
public function getCacheDir(): string
{
return $_SERVER['APP_CACHE_DIR'] ?? parent::getCacheDir();
}
/**
* {@inheritdoc}
*/
public function getLogDir(): string
{
return $_SERVER['APP_LOG_DIR'] ?? parent::getLogDir();
}
/**
* {@inheritdoc}
*/