Finally, I found a satisfactory and elegant (well, in my opinion !) solution to the "global variable" problem. In fact, global variables dissapear in PHP6 (and it was about time !) It will be replaced by a core abstract class called Jaws. After it is initialized, all the modules (log, sessions, database, etc.) will be available using static variables. In exemplis, the singleton Jaws_Log class for logging functions will be accessed via Jaws::$Log. Don't throw rocks at me, that's the better solution I found ! Also, it's good to know that all classes are autoloaded via Jaws::autoload(), so no need to include the files manually (unless they are external libraries).

 

Also, I wanted to mention that I ran into some problems with Doctrine but the developers were extremely helpful. I sent two patches to fix little glitches and they were commited. I have the strange feeling I'll have to work closely with them this summer... Not that it really frustrates me. After all, one of the reasons of my project is to test other people's toys !

nicobn | General | 16 June, 12:45am
David Coallier, <> / 16 June, 4:54am  
avatar

We mofo, we! :)

[ Reply (0) ]

Leave a Comment









Comment XML feeds: RSS | Atom
Total Visitors:112772