/** * @param bool $boot * @return Container|ContainerBuilder */ public function rebuildDIC(bool $boot = true) : Container { $containerBuilder = new ContainerBuilder(); $this->readAnnotations($containerBuilder); $containerBuilder->addCompilerPass(new GlobalCompilerPass()); $containerBuilder->compile(); $this->dumpContainer($containerBuilder); if ($boot) { $core = new Core(); return $core->boot(); } return $containerBuilder; }
<?php use BrainExe\Core\Core; require_once __DIR__ . '/../vendor/autoload.php'; define('ROOT', realpath(__DIR__ . "/..") . '/'); $core = new Core(); $core->boot();
<?php use BrainExe\Core\Core; require_once __DIR__ . '/../vendor/autoload.php'; define('ROOT', realpath(__DIR__ . '/..') . '/'); $core = new Core(); return $core->boot();