I’m a ZF noob and was noticing that ZF OOP relies heavily on service managers rather than instantiating classes directly. This article explores why things are set up that way.
It seems like very PHP ZF2 blog has an article about Dependency Injection, so here's mine. I hope it's clear, or at least helps corroborate what you're reading on other sites.
A bunch of useful references.
One of the surprises of ZF2 is that the preamble to the code looks like this:
namespace Album\Model; use Zend\InputFilter\Factory as InputFactory; use Zend\InputFilter\InputFilter;
I was getting ready to dump PHP and move on to an all-JS, or maybe try really using Haskell or back to C again (or C++ or even Java), but there's just a ton of demand for PHP.
Slaptech framework was a PHP 4 based framework that never got released into the public, that we built to do projects.
This is a short tutorial about using ctags (or exuberant ctags) to work with the vim editor to give you a great code browser.
DOMTemplate is a new templating system that doesn't use any markup.
So, I had this painful gout attack today and was mostly bedridden. It sucked. But I got some reading done, which was nice. My mind wandered and came up with this idea (and a headache).
I'm getting back to setting up Drupal for LA IMC, but keep hitting little walls. I've decided I definitely want to extract proper nouns and keywords from the articles.
I still see people naming their files "something.inc". The problem with doing that is the server won't interpret .inc files as PHP files. By default it treats them as text. So if you have your database password in a file named config.inc, it might accidentally get exposed.
[Turns out there's a PECL extension for tainting: http://www.php.net/manual/en/book.taint.php
So this article is already kind of obsolete.]
It's hard to concentrate when you're tired and cranky, so I wasted some time writing a simple calculator in several different languages.
I accidentally reused the variable name $count twice in a function.