Exemples from the book Learning PHP Design Patterns (by William Sanders, O'Reilly, 2013)