[dev] [commits] Horde branch develop updated. fa956a4d83a7227e2a5d47bfe87185854e151fbc

Michael M Slusarz slusarz at horde.org
Mon Feb 13 11:42:17 UTC 2012


Quoting Jan Schneider <jan at horde.org>:

>>> _init() is for bootstrapping only.  You can't call  
>>> registry/horde-wide things in there due to the chicken/egg  
>>> problem.  _init() is not designed to set up the full application  
>>> environment.
>
> But we have been using it for exactly that since Horde 4. We cannot  
> simply change the semantics of an API method because it doesn't work  
> anymore after some refactoring in Horde or Horde_Core.
> _init() has always been the place to set up the app environment  
> since we dropped base.php.

Not to mention, this is exactly what we were trying to avoid by  
getting rid of base.php: that we always had to initialize the full  
application every time we switched to it.  When there is no need to do  
that in many situations.  So no: init() was never meant to replicate  
base.php.

That doesn't mean you can't get away with doing these initialization  
tasks in _init().  But just because it has "worked in the past"  
doesn't mean it was designed to do that.  It has just been a fortunate  
accident if it didn't break things before.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list