professional-php-04-rockband-builder.php / php
<?php require_once("interface_builder.php"); require_once("class_rockband.php"); require_once("class_musician.php"); require_once("class_instrument.php"); class RockBandBuilder implements Builder { private name) { name); } public function getBand() { return musician = new Musician("rock drummer"); drumset->add(new Instrument("cymbal")); drumset->add(new Instrument("snare drum")); drumset); musician); } public function buildGuitarist() { guitar = new Instrument("electric guitar"); guitar); musician); } } ?>
(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.