The decorator design pattern allows us to add behavior to an existing object in a dynamic way. The following video clip explains it using a code sample in PHP.

You can find the source code available for free download in my ‘PHP Design Patterns’ course, which is available for free personal usage at www.abelski.org.

Leave a Reply

Your email address will not be published. Required fields are marked *