professional-php-04-decorator.php / php
<?php require_once ("abstract_widget.php"); require_once ("closebox_decorator.php"); require_once ("border_decorator.php"); require_once (<observable.php>); widgetA = new BasicWidget(); widgetB = new BorderDecorator(widgetB = new CloseBoxDecorator(widgetA = new CloseBoxDecorator(widgetA = new BorderDecorator(dat->addObserver(dat->addObserver(dat->addRecord("drum", "$12.95", 1955); dat->addRecord("banjo", "$100.95", 1945); widgetB->draw(); echo "<br>";
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.