The Decorator Design Pattern in PHP PRO

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.

Share:

The Visitor Design Pattern

The Visitor Design Pattern

The visitor design pattern allows us to add operations to objects that already exist without modifying their classes and without extending them.

The Beauty of Code

Coding is Art! Developing Code That Works is Simple. Develop Code with Style is a Challenge!

Update cookies preferences