Skip to content

Commit

Permalink
using spl_autoload_register instead of __autoload
Browse files Browse the repository at this point in the history
  • Loading branch information
marioestrada committed Mar 13, 2012
1 parent a61d2b9 commit 0ba2da1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
7 changes: 0 additions & 7 deletions app/bootstrap.php
@@ -1,7 +1,5 @@
<?php

set_include_path('app/framework/' . PATH_SEPARATOR . get_include_path());

require_once('Cr/Ini.php');

function cr_config($part = '')
Expand All @@ -19,11 +17,6 @@ function cr_config($part = '')
return $GLOBALS['CR']['config'];
}

function __autoload($class_name)
{
require_once str_replace('_', '/', $class_name) . '.php';
}

function fb_log($var)
{
$cr_config = cr_config();
Expand Down
2 changes: 1 addition & 1 deletion app/config/config.ini
Expand Up @@ -4,7 +4,7 @@ debug = true
environment = "development"

; Relative to web server root
app_path = "{APP_PATH}/"
app_path = "cr_resources/"

; Application specific data
; appname = "New Website"
Expand Down
5 changes: 4 additions & 1 deletion index.php
@@ -1,5 +1,8 @@
<?php

require_once('app/framework/Cr/Loader.php');
$loader = new Cr_Loader();

require('app/bootstrap.php');
require_once('Cr/Base.php');

Cr_Base::dispatch();

0 comments on commit 0ba2da1

Please sign in to comment.