--- /dev/null
+<?php
+
+require_once 'Horde/Autoloader.php';
+require_once 'Horde/Autoloader/ClassPathMapper.php';
+require_once 'Horde/Autoloader/ClassPathMapper/Default.php';
+
+class Horde_Core_Autoloader extends Horde_Autoloader
+{
+ public function __construct()
+ {
+ foreach (array_reverse(explode(PATH_SEPARATOR, get_include_path())) as $path) {
+ if ($path == '.') { continue; }
+ $path = realpath($path);
+ if ($path) {
+ $this->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Default($path));
+ }
+ }
+ }
+}
+
+$__autoloader = new Horde_Core_Autoloader();
+$__autoloader->registerAutoloader();
$GLOBALS['registry'] = $this;
$injector->setInstance('Horde_Registry', $this);
+ $injector->setInstance('Horde_Autoloader', $GLOBALS['__autoloader']);
+
/* Initialize browser object. */
$GLOBALS['browser'] = $injector->getInstance('Horde_Browser');
* be done here because it is possible to try to load app-specific
* libraries from other applications. */
$app_lib = $this->get('fileroot', $app) . '/lib';
- Horde_Autoloader::addClassPattern('/^' . $app . '(?:$|_)/i', $app_lib);
+ $GLOBALS['injector']->getInstance('Horde_Autoloader')->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^' . $app . '(?:$|_)/i', $app_lib));
$checkPerms = !isset($options['check_perms']) || !empty($options['check_perms']);
</dir> <!-- /lib/Horde/Core/Auth/Signup -->
<file name="Signup.php" role="php" />
</dir> <!-- /lib/Horde/Core/Auth -->
+ <file name="Autoloader.php" role="php" />
<dir name="Autoloader">
<dir name="Callback">
<file name="Auth.php" role="php" />
<install name="lib/Horde/Core/Auth/Signup/Null.php" as="Horde/Core/Auth/Signup/Null.php" />
<install name="lib/Horde/Core/Auth/Signup/Sql.php" as="Horde/Core/Auth/Signup/Sql.php" />
<install name="lib/Horde/Core/Auth/Signup/SqlObject.php" as="Horde/Core/Auth/Signup/SqlObject.php" />
+ <install name="lib/Horde/Core/Autoloader.php" as="Horde/Core/Autoloader.php" />
<install name="lib/Horde/Core/Autoloader/Callback/Auth.php" as="Horde/Core/Autoloader/Callback/Auth.php" />
<install name="lib/Horde/Core/Autoloader/Callback/Mime.php" as="Horde/Core/Autoloader/Callback/Mime.php" />
<install name="lib/Horde/Core/Binder/Alarm.php" as="Horde/Core/Binder/Alarm.php" />
/* Set up autoload paths for core Horde libs (located in lib/). This can't
* be defined in Horde_Autoloader since the current directory path can not be
* determined there. */
-require_once 'Horde/Autoloader.php';
-Horde_Autoloader::addClassPattern('/^Horde(?:$|_)/i', $dirname);
+require_once 'Horde/Core/Autoloader.php';
+$__autoloader->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^Horde(?:$|_)/i', $dirname));
/* Default exception handler for uncaught exceptions. The default fatal
* exception handler output may include things like passwords, etc. so don't