whizark/php-patterns — pull request #2 by Trismegiste (2013-09-08 19:03:04+00:00)
Title: fixing a DIP violation in the implementation Object Adapter pattern

Hello

This PR fixes a problem with the implementation with Object Adapter pattern.

An adapter should not create the adaptee, it is rather injected in the adapter (in the constructor)

http://sourcemaking.com/design_patterns/adapter/php

This is mandatory because in your app, both Adaptee and Adapter could live in the same time

Hope this helps