[Wiki] changed: Doc/Dev/Injector

Chuck Hagenbuch <[email protected]>
Newsgroups gmane.comp.horde.cvs
Message-ID <[email protected]>
chuck  Fri, 15 Jan 2010 11:36:02 -0500

Modified page: http://wiki.horde.org/Doc/Dev/Injector
New Revision:  1.1
Change log:  blue -> horde

@@ -8,22 +8,22 @@
  ++ FAQ

  h1. Dependency Injection Container FAQ

-h2. Where can {{Blue_Injector}} be used?
+h2. Where can {{Horde_Injector}} be used?

  In the application layer only. If you use this in your business  
models I will find you and beat you to death with a shoe.

-h2. How do I provide {{Blue_Config}} values to my business models?
+h2. How do I provide {{Horde_Config}} values to my business models?

  Factories.

  {code:title=Using factories to provide configuration variables to  
business models}
  $injector->bindFactory('InterfaceX', 'FactoryX', 'create');

  class FactoryX {
-public function create(Blue_Injector $injector) {
-$setting = $injector->getInstance('Blue_Config')->get('main', 'setting');
+public function create(Horde_Injector $injector) {
+$setting = $injector->getInstance('Horde_Config')->get('main', 'setting');
  return new X($setting);
  }
  }
  {code}
@@ -43,9 +43,9 @@

  class Dictionary_Sources extends ArrayObject{}

  class Dictionary_Sources_Factory {
-public function create(Blue_Injector $injector) {
+public function create(Horde_Injector $injector) {
  return new Dictionary_Sources(array(
  $injector->getInstance('Dictionary_Source_Cache'),
  $injector->getInstance('Dictionary_Source_Db'),
  $injector->getInstance('Dictionary_Source_Json')


-- 
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.