README Adapter

This commit is contained in:
Dominik Liebler
2013-09-24 14:22:38 +02:00
parent 8ff9f1fc01
commit 069b6de8ba
2 changed files with 11 additions and 1 deletions

View File

@ -5,7 +5,7 @@ namespace DesignPatterns\Adapter;
/**
* EBookAdapter is an adapter to fit an e-book like a paper book
*
* This is the adapter here. Notice it implemennts PaperBookInterface,
* This is the adapter here. Notice it implements PaperBookInterface,
* therefore you don't have to change the code of the client which using paper book.
*/
class EBookAdapter implements PaperBookInterface

10
Adapter/README.md Normal file
View File

@ -0,0 +1,10 @@
# Adapter / Wrapper
## Purpose
To translate one interface for a class into a compatible interface. An adapter allows classes to work together that normally could not because of incompatible interfaces by providing it's interface to clients while using the original interface.
## Examples
* DB Client libraries adapter
* using multiple different webservices and adapters normalize data so that the outcome is the same for all