// Set up application class and controller loading
// @TODO separate $app from class names so that there can be multiple instances
// of an app in the registry?
-Horde_Autoloader::addClassPattern('/^' . $app . '_/i', $fileroot . '/lib/');
-Horde_Autoloader::addClassPattern('/^' . $app . '_/i', $fileroot . '/app/controllers/');
+$injector->getInstance('Horde_Autoloader')->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^' . $app . '(?:$|_)/i', $fileroot . '/lib/'));
// Create our controller context.
$context = array(
* Prepare the test setup.
*/
@define('INGO_BASE', dirname(__FILE__) . '/../..');
-require_once 'Horde/Autoloader.php';
+require_once 'Horde/Core/Autoloader.php';
date_default_timezone_set('Europe/Berlin');
/**
// Set up autoload
$basedir = dirname(__FILE__);
- Horde_Autoloader::addClassPattern('/^Ingo(?:$|_)/', $basedir . '/../');
+ $GLOBALS['__autoloader']->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^Ingo(?:$|_)/', $basedir . '/../'));
$suite = new PHPUnit_Framework_TestSuite('Ingo');
$baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
/**
* The Autoloader allows us to omit "require/include" statements.
*/
-require_once 'Horde/Autoloader.php';
+require_once 'Horde/Core/Autoloader.php';
/**
* FIXME START
* FIXME END
*/
-/** Configure the Autoloader to handle the "Koward" pattern */
-Horde_Autoloader::addClassPattern('/^Koward_/', 'Koward/');
+/* Configure the Autoloader to handle the "Koward" pattern */
+$__autoloader->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^Koward_/', 'Koward/'));
-/** Dispatch the request. */
+/* Dispatch the request. */
try {
Koward::dispatch($opts->base . '/htdocs/koward/koward.php', 'Koward_Cli');
} catch (Exception $e) {
/**
* The Autoloader allows us to omit "require/include" statements.
*/
-require_once 'Horde/Autoloader.php';
+require_once 'Horde/Core/Autoloader.php';
if (!defined('KOWARD_BASE')) {
define('KOWARD_BASE', dirname(__FILE__) . '/../');
}
/* Set up the application class and controller loading */
-Horde_Autoloader::addClassPattern('/^Koward_/', KOWARD_BASE . '/lib/');
-Horde_Autoloader::addClassPattern('/^Koward_/', KOWARD_BASE . '/app/controllers/');
+$__autoloader->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^Koward_/', KOWARD_BASE . '/lib/'));
/**
* The Autoloader allows us to omit "require/include" statements.
*/
-require_once 'Horde/Autoloader.php';
+require_once 'Horde/Core/Autoloader.php';
-/** Configure the Autoloader to handle the "Koward" pattern */
-Horde_Autoloader::addClassPattern('/^Koward_/', 'Koward/');
+/* Configure the Autoloader to handle the "Koward" pattern */
+$__autoloader->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^Koward_/', 'Koward/'));
-/** Dispatch the request. */
+/* Dispatch the request. */
try {
Koward::dispatch(__FILE__);
} catch (Exception $e) {
/* For now, autoloading the Content_* classes depend on there being a
* registry entry for the 'content' application that contains at least
* the fileroot entry. */
- Horde_Autoloader::addClassPattern('/^Content_/', $GLOBALS['registry']->get('fileroot', 'content') . '/lib/');
+ $GLOBALS['injector']->getInstance('Horde_Autoloader')->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^Content_/', $GLOBALS['registry']->get('fileroot', 'content') . '/lib/'));
if (!class_exists('Content_Tagger')) {
throw new Horde_Exception('The Content_Tagger class could not be found. Make sure the registry entry for the Content system is present.');
}
'css_td' => 'table-cell',
'css_th' => 'table-cell'));
- Horde_Autoloader::addClassPattern('/^Text_Wiki_Render_Xhtml/', WICKED_BASE . '/lib/Text_Wiki/Render/Xhtml');
+ $GLOBALS['injector']->getInstance('Horde_Autoloader')->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^Text_Wiki_Render_Xhtml/', WICKED_BASE . '/lib/Text_Wiki/Render/Xhtml'));
}
- Horde_Autoloader::addClassPattern('/^Text_Wiki_Parse/', WICKED_BASE . '/lib/Text_Wiki/Parse/' . $format);
+ $GLOBALS['injector']->getInstance('Horde_Autoloader')->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^Text_Wiki_Parse/', WICKED_BASE . '/lib/Text_Wiki/Parse/' . $format));
return $this->_proc;
}