News Archive
PhpRiot Newsletter
Your Email Address:

More information

A Simple Resource Injector for ZF Action Controllers

Note: This article was originally published at phly, boy, phly on 24 March 2010.

Brandon Savage approached me with an interesting issue regarding ZF bootstrap resources, and accessing them in your action controllers. Basically, he'd like to see any resource initialized by the bootstrap immediately available as simply a public member of his action controller.

So, for instance, if you were using the "DB" resource in your application, your controller could access it via $this-db.

Continue reading "A Simple Resource Injector for ZF Action Controllers"