Design Patterns in php