[dev] [commits] Horde branch master updated. e341f631c21530eab8ab052a3c32dc39392af5ee
Michael M Slusarz
slusarz at horde.org
Tue May 4 22:41:30 UTC 2010
Quoting Michael Rubinsky <mrubinsk at horde.org>:
> Quoting Michael M Slusarz <slusarz at horde.org>:
>
>> Quoting Michael Rubinsky <mike at theupstairsroom.com>:
>>
>>> commit e341f631c21530eab8ab052a3c32dc39392af5ee
>>> Author: Michael J. Rubinsky <mrubinsk at horde.org>
>>> Date: Tue May 4 12:33:25 2010 -0400
>>>
>>> Need to put this in global scope
>>>
>>> No way to access the public driver property like this from
>>> application code.
>>>
>>> jonah/lib/Application.php | 4 +---
>>> 1 files changed, 1 insertions(+), 3 deletions(-)
>>>
>>> http://git.horde.org/diff.php/jonah/lib/Application.php?rt=horde-git&r1=0c536c36ce6d126ad730483492a3ae7d16e1ae5d&r2=e341f631c21530eab8ab052a3c32dc39392af5ee
>>
>> Sure there is: use the injector.
>
> I'm not sure I understand. I agree that binding the driver factory
> to the injector is the way to go, but not from Jonah_Application. I
> thought that the *_Application objects were for other
> applications/core libraries to interact with the application, not
> for using it as a sort of quasi-global object.
You are correct. But that's what begs the question: why does
'jonah_driver' need to be global? That's the worst thing we can do in
the Application file - another app calls jonah and all of a sudden a
new global variable appears when flow is handed back to the original
application.
> This commit was merely to get Jonah loading without fatals so I
> could keep it activated while it's being refactored...
That could be what I was missing - you were simply trying to make it
work now. Although IMHO the eventual solution is to get rid of the
_init() call in Jonah_Application entirely and convert all
'jonah_driver' references to injector calls.
My personal goal is to eliminate all globals except those defined in
http://wiki.horde.org/Doc/Dev/GlobalsH4
michael
--
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the dev
mailing list