From: Gunnar Wrobel
Date: Mon, 23 Aug 2010 15:26:52 +0000 (+0200)
Subject: I don't see a reason to avoid providing the default autoloader within
X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=67188414002f31bb1a9635e2abdae8d1c0312488;p=horde.git
I don't see a reason to avoid providing the default autoloader within
Horde_Autoloader.
It introduces no additional dependencies and will be required by a any
application that does not derive from Horde_Core.
---
diff --git a/framework/Autoloader/lib/Horde/Autoloader/Default.php b/framework/Autoloader/lib/Horde/Autoloader/Default.php
new file mode 100644
index 000000000..355fde0f9
--- /dev/null
+++ b/framework/Autoloader/lib/Horde/Autoloader/Default.php
@@ -0,0 +1,32 @@
+
+ * @author Chuck Hagenbuch
+ * @category Horde
+ * @package Horde_Autoloader
+ */
+require_once 'Horde/Autoloader.php';
+require_once 'Horde/Autoloader/ClassPathMapper.php';
+require_once 'Horde/Autoloader/ClassPathMapper/Default.php';
+
+class Horde_Autoloader_Default 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_Autoloader_Default();
+$__autoloader->registerAutoloader();
diff --git a/framework/Autoloader/package.xml b/framework/Autoloader/package.xml
index 66c12e01f..aca0967b6 100644
--- a/framework/Autoloader/package.xml
+++ b/framework/Autoloader/package.xml
@@ -47,6 +47,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
+
@@ -68,6 +69,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
+