© Matt Zandstra 2021
M. ZandstraPHP 8 Objects, Patterns, and Practicehttps://doi.org/10.1007/978-1-4842-6791-2_11

11. Performing and Representing Tasks

Matt Zandstra1  
(1)
Brighton, 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 tree ...

Get PHP 8 Objects, Patterns, and Practice: Mastering OO Enhancements, Design Patterns, and Essential Development Tools 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.