Category Archives: Programming

Programming in general.

PHP – Instantiate a class from a string with namespace

I know this is old but I just learned it today. Instantiating a class from a string requires a full namespace of the class, otherwise it won’t work. You cannot use a namespace to make shortcuts. See example below. Shortcut? … Continue reading

Posted in php, Programming | Tagged , | 3 Comments

PHP Recursion – Cellphone Number Combination

Few days ago, a friend ask help for an obviously recursive problem. The problem was to give all letter combination for every given number in a typical cellphone number. Given a very limited time at work, I manage to solve … Continue reading

Posted in php, Recursion | Tagged , , , , | 2 Comments

Custom Validator Suite – Zend Framework

In Zend Framework, there are already tons of validators under Zend_Validate. In Zend_Form, you can attach validators, as a result, you can have a validator suite ready. However, I don’t use Zend_Form and I just don’t like how validations are … Continue reading

Posted in Programming, Zend Framework | Tagged , , , , | 2 Comments