🎉 Hooray! After 3 years of work, I've finally released the ebook on design patterns! Check it out »
Adapter

Adapter in PHP

Adapter is a Conceptual design pattern, which allows incompatible objects to collaborate.

Adapter acts as a wrapper between two objects, It catches calls for one object and transforms them to format and interface recognizable by the second object.

Learn more about Adapter

Usage of the pattern in PHP

Complexity:

Popularity:

Usage examples: The Adapter pattern is pretty common in PHP code. It’s very often used in systems based on some legacy code. In such cases, Adapters make legacy code with modern classes.

Adapter in Other Languages

Adapter in Java Adapter in C# Adapter in Python Adapter in Ruby Adapter in Swift Adapter in TypeScript