/** * Bootstrap construction. * * @param DiInterface $di Dependency injection. * @param Manager $em Events manager object. */ public function __construct($di, $em) { parent::__construct($di, $em); /** * Attach this bootstrap for all application initialization events. */ $em->attach('init', $this); }
/** * Bootstrap construction. * * @param DiInterface $di Dependency injection. * @param Manager $em Events manager object. */ public function __construct($di, $em) { parent::__construct($di, $em); }
<?php use Engine; include 'config.php'; if (DEBUG) { ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); } $url = isset($_GET['url']) ? $_GET['url'] : 'home/index'; $bootstrap = new Engine\Bootstrap($url); spl_autoload_register(array($bootstrap, 'loader')); $bootstrap->init();