<?phpnamespaceDesignPatterns\Structural\Decorator;/** * the Decorator MUST implement the RenderableInterface contract, this is the key-feature * of this design pattern. If not, this is no longer a Decorator but just a dumb * wrapper. */abstractclassRendererDecoratorimplementsRenderableInterface{/** * @var RenderableInterface */protected$wrapped;/** * @param RenderableInterface $renderer */publicfunction__construct(RenderableInterface$renderer){$this->wrapped=$renderer;}}