Skip to content

Commit

Permalink
Setup variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ProklUng committed Aug 20, 2021
1 parent 5d62601 commit 4c0dd1b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/DI/AbstractServiceContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,5 +207,12 @@ private function createContainer() : void
$adapter->importParameters(static::$container, $this->config);
$adapter->importParameters(static::$container, $this->parameters);
$adapter->importServices(static::$container, $this->services);

static::$container->setParameter('kernel.debug', $this->debug);
static::$container->setParameter('kernel.environment', $this->debug ? 'dev' : 'prod');
static::$container->setParameter('kernel.project_dir', $_SERVER['DOCUMENT_ROOT']);
static::$container->setParameter('kernel.cache_dir', $_SERVER['DOCUMENT_ROOT'] . $this->parameters['cache_path']);
static::$container->setParameter('kernel.build_dir', $_SERVER['DOCUMENT_ROOT'] . $this->parameters['cache_path']);
static::$container->setParameter('kernel.charset', 'UTF-8');
}
}

0 comments on commit 4c0dd1b

Please sign in to comment.