cbcram
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Downloads
Gallery
Store
Posts posted by cbcram
-
-
Hi,
I'm watching the chapter 4 of Advance PHP. I've got a problem. When I create a new class controller (i.e. IndexController) the public function dispatch() doesn't do anything. In the video class it works fine. It seems that this function is executed automatically when the class is created, isn't it? And why doesn't it works in my computer?
I'm using PHP Version 5.3.3-7+squeeze1 on Apache 2.2.
I also take to ask how the dispatch function uses the uri parameter, which is never passed to the class neither to the function?
Thanks, for your attention and for the videos -they are really great!!.
Marc
Chapter 4 - public function dispatch()
in Advanced PHP Videos
Posted
Solved!!!
Sorry it was my fault. In my video doesn't appear the last line of the index.php (public function) so I missed to include $controller->dispatch($uri). There's no problem, dispatch isn't a phantom function, and the recived parameters are passed to it in normal way. I've seen in the solution in chapter 5, where the missing line in chapter 4 appears.
Sorry to all to make spend your time, and thank you all.
Marc