This process reveals how polymorphism works. Each request for the concrete method’s algorithm is through a Context instance, and so the requests for all of them look exactly alike: $context->algorithm().
- 12. The Flexibility of the Strategy Design Pattern
- from Learning PHP Design Patterns
- Publisher: O'Reilly Media, Inc.
- Released: February 2013
So this is what' OO is all about.
Share this highlighthttp://www.safaribooksonline.com/a/learning-php-design/320/