Wrox Programmer Forums
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 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 January 24th, 2011, 12:59 PM
Friend of Wrox
Join Date: Jun 2003
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
$called = call_user_func_array(array(new $this->parts[0], $this->parts[1]), array($this->parts));
In the download code you have
$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?

Mike Moore
Old January 24th, 2011, 08:52 PM
Wrox Author
Join Date: Sep 2009
Posts: 15
Thanks: 0
Thanked 4 Times in 4 Posts

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

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

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