diff options
author | Remi Collet <fedora@famillecollet.com> | 2010-06-08 18:39:20 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2010-06-08 18:39:20 +0200 |
commit | a6282ca0e8a13fd53b4bea6eeff7a69f1312eef3 (patch) | |
tree | 58501066f8c91396759d5174e65924522300bf3a /include | |
parent | da02f485fe6a2c0a478fdd33145daf2bbb10b65e (diff) |
autoload
Diffstat (limited to 'include')
-rw-r--r-- | include/main.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/main.php b/include/main.php index b97db02..265d20c 100644 --- a/include/main.php +++ b/include/main.php @@ -37,7 +37,6 @@ define('RPMPHP_VERSION', '1.0.0-dev'); require 'config.php'; require 'Smarty/Smarty.class.php'; -require dirname(__FILE__).'/../class/FedoraClient.php'; $smarty = new Smarty(); @@ -52,6 +51,18 @@ $ariane[] = array ( ); /** + * Manage class autoload + * + * @param string $classname + * + * @return void + */ +function __autoload($classname) +{ + require dirname(__FILE__).'/../class/'.$classname.'.php'; +} + +/** * Get repositories list * * @param object $db a reference to the database |