aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/DIContainer.php
diff options
context:
space:
mode:
authorPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
committerPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
commit4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch)
tree5c07151ae61276d334e88f6309c30d439a85c12e /lib/classes/DIContainer.php
parentda0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff)
parent97a188592c679890a25c37ab78463add76a52ff7 (diff)
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'lib/classes/DIContainer.php')
-rw-r--r--lib/classes/DIContainer.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/classes/DIContainer.php b/lib/classes/DIContainer.php
index 9f0721b..c3d9b82 100644
--- a/lib/classes/DIContainer.php
+++ b/lib/classes/DIContainer.php
@@ -17,7 +17,7 @@ class DIContainer
/**
* Get the globally available instance of the container.
*
- * @return static
+ * @return ContainerInterface
*/
public static function getInstance()
{
@@ -47,9 +47,11 @@ class DIContainer
{
$builder = new ContainerBuilder();
if (\Studip\ENV == 'production') {
- $builder->enableCompilation($GLOBALS['TMP_PATH']);
+ $builder->enableCompilation(
+ self::getCompilationPath(),
+ self::getCompilationClass()
+ );
}
- $builder->ignorePhpDocErrors(true);
$builder->addDefinitions('lib/bootstrap-definitions.php');
$jsonapiSettings = require 'lib/classes/JsonApi/settings.php';
@@ -60,4 +62,14 @@ class DIContainer
return $builder;
}
+
+ public static function getCompilationPath(): string
+ {
+ return $GLOBALS['TMP_PATH'];
+ }
+
+ public static function getCompilationClass(): string
+ {
+ return 'CompiledContainer';
+ }
}