From: Michael M Slusarz Date: Wed, 24 Mar 2010 21:25:06 +0000 (-0600) Subject: optimization, improved doc of injector instances X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5ffdf3ad94472f72c46f54b1075ec35e90891ce6;p=horde.git optimization, improved doc of injector instances --- diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 66847855f..3a9cb5dbc 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -233,6 +233,7 @@ class Horde_Registry /* Define binders. */ $binders = array( 'Horde_Alarm' => new Horde_Core_Binder_Alarm(), + // 'Horde_Browser' - initialized below 'Horde_Cache' => new Horde_Core_Binder_Cache(), 'Horde_Db_Adapter_Base' => new Horde_Core_Binder_Db('reader'), 'Horde_Lock' => new Horde_Core_Binder_Lock(), @@ -240,6 +241,7 @@ class Horde_Registry 'Horde_Memcache' => new Horde_Core_Binder_Memcache(), 'Horde_Notification' => new Horde_Core_Binder_Notification(), 'Horde_Perms' => new Horde_Core_Binder_Perms(), + // 'Horde_Registry' - initialized below 'Horde_Secret' => new Horde_Core_Binder_Secret(), 'Horde_Template' => new Horde_Core_Binder_Template(), 'Horde_Token' => new Horde_Core_Binder_Token(), @@ -282,8 +284,7 @@ class Horde_Registry $injector->setInstance('Horde_Registry', $this); /* Initialize browser object. */ - $GLOBALS['browser'] = new Horde_Browser(); - $injector->setInstance('Horde_Browser', $GLOBALS['browser']); + $GLOBALS['browser'] = $injector->getInstance('Horde_Browser'); /* Import and global Horde's configuration values. Almost a chicken * and egg issue - since loadConfiguration() uses registry in certain