diff options
-rw-r--r-- | framework/PradoBase.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/framework/PradoBase.php b/framework/PradoBase.php index ec1b8790..e60daafb 100644 --- a/framework/PradoBase.php +++ b/framework/PradoBase.php @@ -97,7 +97,16 @@ class PradoBase */ public static function initAutoloader() { - self::$_loader = require_once __DIR__ . '/../vendor/autoload.php'; + $autoloadPaths = array( + __DIR__ . '/../../../autoload.php', // prado as dependency + __DIR__ . '/../vendor/autoload.php', // prado itself + ); + foreach($autoloadPaths as $autoloadPath) + if(file_exists($autoloadPath)) { + self::$_loader = $autoloadPath; + break; + } + spl_autoload_register(array(get_called_class(), 'autoload')); } |