dependency injection container

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Re: dependency injection container

Post by Maugrim_The_Reaper »

DI in HTMLPurifier? Will I need to pull down another trunk update soon? ;)

BTW - I highlighted HTMLPurifier on my blog again. I'm using it to filter blog posts before database storage (mainly since the idea of leaving potential XSS in the database and using post-filtering for display bothered me - what if I migrate the posts to another application without HTMLPurifier? Meh!).

I'll keep on highlighting it too. Truly excellent library.
I just figured it's easy to read, but yeah the increments are larger than they need to be.
I usually just use the actual Constant name itself if possible. I was watching Placeholder's in the ZF, and to use a constant I had the option of Zend_View_Helper_Placeholder_Container_Abstract::PREPEND or "PREPEND". I'll leave it others to guess which I'm using ;). I know it might be the best practice, but on this specific point best practice can throw itself off a cliff for all I care.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: dependency injection container

Post by Chris Corbyn »

Maugrim_The_Reaper wrote:I'll keep on highlighting it too. Truly excellent library.
[ot]
100% agree. It's one of those projects which people should look at as a model example of great PHP.
[/ot]
Post Reply