for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace BrainExe\Core;
use BrainExe\Core\DependencyInjection\Rebuild;
use Symfony\Component\DependencyInjection\Container;
/**
* @api
*/
class Core
{
* @return Container
public function boot() : Container
chdir(ROOT);
umask(0); // todo try to remove
$fileName = ROOT . 'cache/dic.php';
/** @var Container $dic */
if (is_file($fileName)) {
$className = file_get_contents(ROOT . 'cache/dic.txt');
if (!class_exists($className, false)) {
include $fileName;
}
$dic = new $className();
} else {
$rebuild = new Rebuild();
$dic = $rebuild->rebuildDIC(true);
$dic->get('monolog.ErrorHandler');
return $dic;