Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Professional PHP Design Patterns
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional PHP Design Patterns
This is the forum to discuss the Wrox book Professional PHP Design Patterns by Aaron Saray ISBN: 978-0-470-49670-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional PHP Design Patterns 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 24th, 2011, 11:59 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oklahoma City, Oklahoma, USA.
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 22 Controller Class

Chapter 22, Controller Class page 165.


In the book you have
Code:
$called = call_user_func_array(array(new $this->parts[0], $this->parts[1]), array($this->parts));
In the download code you have
Code:
$called = call_user_func(array(new $this->parts[0], $this->parts[1]));
Which is correct? And in the first example shouldn't that the last value be array($this->params), instead of array($this->parts), since you would be passing on additional values?

Thanks
Mike Moore
__________________
Peace
Mike
http://www.eclecticpixel.com
Reply With Quote
  #2 (permalink)  
Old January 24th, 2011, 07:52 PM
Wrox Author
Points: 118, Level: 2
Points: 118, Level: 2 Points: 118, Level: 2 Points: 118, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2009
Location: Milwaukee, WI
Posts: 15
Thanks: 0
Thanked 4 Times in 4 Posts
Default

You made a great catch - it should be $this->params. And it should be the line of call_user_func_array.
__________________
-aaron
--
aaronsaray.com || <-- yeah... try it.
Reply With Quote
Reply


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
Chapter 22: Introduction to Project Management... Project Program integration chrisa BOOK: Professional Application Lifecycle Management with Visual Studio 2010 1 September 15th, 2010 03:28 PM
Issues about PerformanceCounter (Chapter 22) newmike BOOK: Professional C#, 2nd and 3rd Editions 0 June 15th, 2004 10:10 PM



All times are GMT -4. The time now is 03:09 PM.


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