Modern design patterns for PHP5