<?php /** * Cubex Website Project * @author Brooke Bryan */ define('PHP_START', microtime(true)); /** ************************************** * Register The Composer Auto Loader * ************************************** */ $autoLoader = (require dirname(__DIR__) . '/vendor/autoload.php'); /** * Set your Cubex Environment here for when running the php build in web server */ if (strstr($_SERVER['SERVER_SOFTWARE'], 'Development Server')) { putenv("CUBEX_ENV=development"); } /** * Initiate Cubex */ $cubex = new \Cubex\Loader($autoLoader); /** * Respond to Web Request (Cubex Returns \Cubex\Http\Response */ $response = $cubex->respondToWebRequest();
************************************** * Register The Composer Auto Loader * ************************************** */ $autoLoader = (require dirname(__DIR__) . '/vendor/autoload.php'); /** * If you are unable to set your environment within a vhost, you can define * it using the following line of code * * putenv("CUBEX_ENV=development"); * */ /** * Initiate Cubex */ $cubex = new \Cubex\Loader($autoLoader); /** * Pull in Cubex Configuration */ $configArray = \Cubex\Foundation\Config\ConfigGroup::fromArray(array_replace_recursive(parse_ini_file(dirname(__DIR__) . '/conf/defaults.ini', true), parse_ini_file(dirname(__DIR__) . '/conf/' . CUBEX_ENV . '.ini', true))); $cubex->configure($configArray); /** * Respond to Web Request (Cubex Returns \Cubex\Http\Response */ $response = $cubex->respondToWebRequest(); /** * Should you wish to find out the PHP Request time */ /* if($response->renderType() === \Cubex\Core\Http\Response::RENDER_RENDERABLE) {