Skip to content

Commit 2b637cb

Browse files
committed
Provides a way to override cache and log folders form the ENV
1 parent 9f45d71 commit 2b637cb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Kernel/MicroKernelTrait.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,22 @@ trait MicroKernelTrait
6363
*/
6464
//abstract protected function configureContainer(ContainerConfigurator $c): void;
6565

66+
/**
67+
* {@inheritdoc}
68+
*/
69+
public function getCacheDir(): string
70+
{
71+
return $_SERVER['APP_CACHE_DIR'] ?? parent::getCacheDir();
72+
}
73+
74+
/**
75+
* {@inheritdoc}
76+
*/
77+
public function getLogDir(): string
78+
{
79+
return $_SERVER['APP_LOG_DIR'] ?? parent::getLogDir();
80+
}
81+
6682
/**
6783
* {@inheritdoc}
6884
*/

0 commit comments

Comments
 (0)