Remove the last Horde_Autoloader:: static calls
authorChuck Hagenbuch <chuck@horde.org>
Sat, 5 Jun 2010 02:41:36 +0000 (22:41 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Sat, 5 Jun 2010 02:41:36 +0000 (22:41 -0400)
framework/Core/lib/Horde/Registry.php
framework/Date_Parser/examples/Horde/Date/Parser/parse.php
framework/Model/www/test.php
framework/bin/test_framework

index 63d64ae..279edb9 100644 (file)
@@ -276,11 +276,6 @@ class Horde_Registry
             )
         );
 
-        /* Setup autoloader callbacks. */
-        foreach ($callbacks as $key => $val) {
-            Horde_Autoloader::addCallback($key, array($val, 'callback'));
-        }
-
         /* Setup injector. */
         $GLOBALS['injector'] = $injector = new Horde_Injector(new Horde_Injector_TopLevel());
 
@@ -294,7 +289,12 @@ class Horde_Registry
         $GLOBALS['registry'] = $this;
         $injector->setInstance('Horde_Registry', $this);
 
+        /* Setup autoloader instance and callbacks. */
         $injector->setInstance('Horde_Autoloader', $GLOBALS['__autoloader']);
+        foreach ($callbacks as $key => $val) {
+            $GLOBALS['__autoloader']->addCallback($key, array($val, 'callback'));
+        }
+
 
         /* Initialize browser object. */
         $GLOBALS['browser'] = $injector->getInstance('Horde_Browser');
index 8f87683..6814a4a 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
-require 'Horde/Autoloader.php';
-Horde_Autoloader::addClassPath(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/lib');
+set_include_path(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/lib:' . get_include_path());
+require 'Horde/Core/Autoloader.php';
 
 $t = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : 'this fortnight';
 $opts = count($_SERVER['argv']) > 1 ? array() : array('now' => new Horde_Date('2006-08-16 14:00:00'));
index 8255f61..87466f7 100644 (file)
@@ -10,7 +10,6 @@ $horde_base = '/path/to/horde';
 
 require_once $horde_base . '/lib/Application.php';
 Horde_Registry::appInit('horde', array('authentication' => 'none'));
-Horde_Autoloader::addClassPath(dirname(__FILE__));
 
 $vars = Horde_Variables::getDefaultVariables();
 
index 734180f..66d156e 100755 (executable)
@@ -12,8 +12,8 @@
 
 require_once 'PHPUnit/Util/Filter.php';
 require_once 'PHPUnit/TextUI/Command.php';
-require 'Horde/Autoloader.php';
-Horde_Autoloader::addClassPath(dirname(dirname(dirname(__FILE__))) . '/lib');
+set_include_path(dirname(dirname(dirname(__FILE__))) . '/lib:' . get_include_path());
+require 'Horde/Core/Autoloader.php';
 
 PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');