© Matt Zandstra 2016

MATT ZANDSTRA, PHP Objects, Patterns, and Practice, 10.1007/978-1-4842-1996-6_11

11. Performing and Representing Tasks

Matt Zandstra

(1)Liverpool, Merseyside, UK

In this chapter, we get active. I look at patterns that help you to get things done, whether interpreting a mini-language or encapsulating an algorithm.

This chapter will walk you through several patterns:

  • The Interpreter pattern: Building a mini-language interpreter that can be used to create scriptable applications

  • The Strategy pattern: Identifying algorithms in a system and encapsulating them into their own types

  • The Observer pattern: Creating hooks for alerting disparate objects about system events

  • The Visitor pattern: Applying an operation to all the nodes in a ...

Get PHP Objects, Patterns, and Practice, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.