diff --git a/09-templating.md b/09-templating.md index f023224..3e99998 100644 --- a/09-templating.md +++ b/09-templating.md @@ -16,7 +16,7 @@ You could just type hint against the concrete class. But the problem with this a In other words, all your code that uses the engine will be coupled to this mustache package. If you want to change the implementation you have a problem. Maybe you want to switch to Twig, maybe you want to write your own class or you want to add functionality to the engine. You can't do that without going back and changing all your code that is tightly coupled. -What we want is loose coupling. We will type hint against a class that implements an interface. So if you need another implementation, you just implement that interface in your new class and inject the new class instead. +What we want is loose coupling. We will type hint against an interface and not a class/implementation. So if you need another implementation, you just implement that interface in your new class and inject the new class instead. Instead of editing the code of the package we will use the [adapter pattern](http://en.wikipedia.org/wiki/Adapter_pattern). This sounds a lot more complicated than it is, so just follow along.