diff --git a/Adapter/EBookAdapter.php b/Adapter/EBookAdapter.php index 9677553..d8c5574 100644 --- a/Adapter/EBookAdapter.php +++ b/Adapter/EBookAdapter.php @@ -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 diff --git a/Adapter/README.md b/Adapter/README.md new file mode 100644 index 0000000..5d77709 --- /dev/null +++ b/Adapter/README.md @@ -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