Created
February 5, 2013 00:59
-
-
Save azrad/4711218 to your computer and use it in GitHub Desktop.
How I autoload my models
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
spl_autoload_register('seed_autoload'); | |
function seed_autoload($class_name) { | |
$the_class_name = from_camel_case($class_name); | |
if(file_exists(MODEL_DIR .'/' .$the_class_name .'.class.php')) | |
require_once MODEL_DIR .'/' .$the_class_name .'.class.php'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Akan aplikasi dalam mvc melayu