Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 24th, 2005, 10:44 AM
Registered User
 
Join Date: Jun 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Collection Class chapter 5

Hi everyone,

Just a quick message about the Nightclub example in chapter 5. Using the code specified in the book, php throws the error:

Fatal error: Call to private method NightClub::_loadSingers() from context 'Collection' in d:\web\book\ch05\class.Collection.php on line 91

To fix this, change the _loadSingers function from private to public in the NightClub class (ie public function _loadSingers(Collection $col))

Ed

  #2 (permalink)  
Old November 27th, 2006, 04:46 PM
Authorized User
 
Join Date: Jan 2004
Location: Des Moines, IA, USA.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found the same error in the code on page 119:

To fix this, change the _loadCourses function from private to public.

I notice the code I downloaded has the correction for the _loadSingers function but the _loadCourses example is just like it is printed in the book and doesn't run correctly.

Carl Olsen
www.carl-olsen.com
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to build class structure for collection output jimusa Visual Basic 2005 Basics 3 August 7th, 2008 05:49 PM
return collection by function in class jimusa Visual Basic 2005 Basics 1 July 30th, 2008 04:18 PM
function return collection in class by VB jimusa Visual Studio 2005 1 July 30th, 2008 04:12 PM



All times are GMT -4. The time now is 02:38 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.