Wrapper Pattern¶
The wrapper pattern is also called decorator or adapter. The wrapper pattern wraps one object inside another object to change, extend, simplify or adapt its behavior without modifying the original object.
This is commonly used to add functionality, such as logging, caching, validation, etc., simplify or standardize an interface, isolate third-party code or make testing easier. The concept is also used to describe a class that provide features based on a remote object, such as an API or a system tool, or even higher level features.
The wrapper pattern is identifiable with thin methods, an injection of the same interface, or containing a single distinct object. Identification may require several clues.
Related : PHP Wrappers, file://, Thin Method, Application Programming Interface (API), Wrapper