From the course: PHP: Design Patterns
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Apply the decorator pattern - PHP Tutorial
From the course: PHP: Design Patterns
Challenge: Apply the decorator pattern
(chime) - In this Challenge, I've sketched out a simple index.php in the Challenges folder. It assumes that there's a 'decorator.php' file with the actual 'decorator' implemented inside. You just have to fill in the methods. The methods are lower and uppercase. This shouldn't require any additional libraries to get started. This is a relatively short exercise and should only take you about 10 minutes. When you're finished, check the Solutions folder for one particular solution.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.