Wrox Programmer Forums
BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1
This is the forum to discuss the Wrox book Professional PHP5 by Ed Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove; ISBN: 9780764572821
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 2nd, 2005, 03:09 PM
Registered User
Join Date: Sep 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mysticav
Default About the musician exercise

I was reading that the interface methods must mention explicitly the parameters like this:
public function addInstrument(Instrument $instrument);

but in the book they just put this:
    public function addInstrument();

I'm new to interfaces, and I know a little about basic OOP. So, I don't want to be confused at this stage.

Old June 27th, 2006, 09:39 AM
Authorized User
Join Date: Jun 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts

Indeed, in the downloaded ch02 code are more errors of the same kind as well as another syntax-error

    public function assignToBand(Band $band) {
 //error! $this->$bandReference = $band;
      $this->bandReference = $band;

Old October 30th, 2009, 06:36 AM
Registered User
Join Date: Oct 2009
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts

I'm working on that chapter after fixing those interfaces I got this in my browser:

Musician Jack Float

Catchable fatal error: Object of class Guitarist could not be converted to string in /var/www/php5_book/mycode/ch2/sampleCode.php on line 164

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 5 Exercise 2 diango BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 4 February 1st, 2011 03:24 PM
Please, could anyone help me with this exercise? java2007 Java Basics 3 December 10th, 2007 12:19 PM
about code for musician proyect mysticav BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 0 September 2nd, 2005 02:58 PM
Exercise Solutions gsforfree BOOK: Beginning ASP.NET 1.0 3 June 28th, 2004 12:56 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.