OOP patterns examples using PHP