On NetTuts.com today they continue their look at the SOLID development principles with the next letter in the sequence - O for Open/Closed Principle. The first part of the series, covering "S" (the Single Responsibility Principle) can be found here.

They start with a look at OCP in the overall SOLID context and an example of an obvious violation of the principle. Some example code is provided showing a "Progress" class that's bound to at "File" implementation, not abstracted. They offer three different options for solving the issue:

Take Advantage of the Dynamic Nature of PHP

Use the Strategy Design Pattern

Use the Template Method Design Pattern

Each of the above comes with example code and some with illustrations of the structure they create.