Chapter 3. Adapter Pattern

In a simple world, no software requirements would ever change. Applications and business would not innovate. Programming would be simple, but boring. Programmers would continue to build applications on top of the same technologies that they did years ago. They would never need to introduce different databases, implement new best practices, or consume different APIs. But these things do change. Luckily, programmers have the Adapter Design Pattern to help update legacy systems with new code and functionality.

Name: Adapter

The Adapter Design Pattern simply adapts one object's interfaces to what another object expects.

Get Professional PHP Design Patterns 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.