Skip to content
Permalink
Browse files

Moved constants to bootstrap.

  • Loading branch information...
parkerj committed Oct 3, 2016
1 parent bba073c commit 738bdf40405f8b59c2c0506bcc9c97404e69411e
Showing with 8 additions and 14 deletions.
  1. +3 −0 Liten/Bootstrap.php
  2. +5 −14 index.php
@@ -27,6 +27,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
defined('BASE_PATH') or define('BASE_PATH', __DIR__ . '/../');
require( BASE_PATH . 'Liten' . DS . 'Autoloader.php');
$loader = new \Liten\Autoloader();
$loader->register();
@@ -27,26 +27,17 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/**
* Step 1: Initial constants defined
*
* Several constants defined in order to help
* with the autoloader and the loading of other
* needed functions and files.
*/
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
defined('BASE_PATH') or define('BASE_PATH', __DIR__ . DS);
/**
* Step 2: Require the Bootstrap
* Step 1: Require the Bootstrap
*
* The bootstrap includes defines as well as autoloader
* in order to have a working install of Liten.
*/
require( BASE_PATH . 'Liten' . DS . 'Bootstrap.php');
require('Liten/Bootstrap.php');
/**
* Step 3: Instantiate a Liten application
* Step 2: Instantiate a Liten application
*
* This example instantiates a Liten application using
* its default settings. However, you can configure
@@ -56,7 +47,7 @@
$app = new \Liten\Liten();
/**
* Step 4: Include the routes needed
* Step 3: Include the routes needed
*/
// GET route
$app->get('/', function () {
@@ -177,7 +168,7 @@
);
/**
* Step 5: Run the Liten application
* Step 4: Run the Liten application
*
* This method should be called last. This executes the Liten application
* and returns the HTTP response to the HTTP client.

0 comments on commit 738bdf4

Please sign in to comment.
You can’t perform that action at this time.