Archive for the ‘Proceed2OOP’ Category

PHP Inheritance of a class property’s visibility

Friday, September 3rd, 2010

In Object-Oriented PHP5 a class’s properties can have their ‘visibility‘ set.

If a property is undeclared …

PHP Static Methods Can Be Declared Without Static Keyword But Called Statically

Friday, September 3rd, 2010

Whenever I create a PHP class method that I intend to use statically, I declare it as …

Zend Config XML and INI files - How to Specify False and Other Non-String PHP Data Types

Friday, August 27th, 2010

Zend Config INI and Zend Config XML are handy adaptors that allow you …

How to Convert a Legacy Site over to Zend Framework - 1 Favour Refactoring over Rewriting

Tuesday, May 18th, 2010

Over the years, I have often been faced with the choice of whether to refactor or rewrite.

In …

Setting the referrer in SimpleTest web tests - faking the HTTP_REFERER

Thursday, April 8th, 2010

Sometimes you might want to make a PHP web page do different things depending on the value …

Creating a PHP Subclassed Singleton to Apply Fowler’s “Introduce Null Object” Refactoring

Saturday, January 16th, 2010

I found a need to implement the “Introduce Null Object“ refactoring procedure that is …

PHP - Getting __sleep to return all properties of an object

Monday, January 11th, 2010

If you write a custom __sleep() magic method for a PHP class, you are expected …

Picking Aggregate Roots - Domain Driven Design

Saturday, October 17th, 2009

I’m steadily thinking more and more in terms of Domain Driven Design.

I had often found …

no PHP error thrown when private property accessed or modified by subclass

Friday, April 24th, 2009

This is another ‘Gotcha’  moment that i want to share with you.

I don’t often declare a PHP …

Can an interface class extend another interface class in PHP

Tuesday, April 14th, 2009

Yes - it can in PHP version 5.2.
(The example code below is also available …