Multiple page controllers in one app.

2 views
Skip to first unread message

wlasson

unread,
Mar 11, 2009, 7:00:55 PM3/11/09
to Photon Framework
I've been working on getting a system up that uses the two sections of
the page controller included in Photon, meaning uses both the
PTagViewRenderer and the PhpViewRenderer.

The main system is running off of the PTagViewRenderer but when it
calls to load a module, it uses the PHPViewRenderer so that the
modules do not have to deal with tags etc, and its very simple to
create a multiple page module.

Anyway, the module still ends up loading using the PHPViewRenderer
however, I'm getting a weird error now that I finally have it coded
out take a look:

Catchable fatal error: Argument 4 passed to Page::__construct() must
implement interface ViewResolver, instance of PhpViewRenderer given,
called in /var/www/mpc/core/photon/web/PageControllerApp.php on line
72 and defined in /var/www/mpc/core/photon/web/Page.php on line 17

Everything is loading I'm just getting that error at the top, not sure
where that would be coming from.

Thanks for the help in advance!

wlasson

unread,
Mar 12, 2009, 4:28:23 PM3/12/09
to Photon Framework
I was able to fix it, whether or not I did it right is what you'll
have to see Alvaro, here are the edits:

PhpViewRenderer.php
Line 3:
ORIGINAL: class phpViewRenderer {
CHANGES: class phpViewRenderer implements ViewResolver {

Line 17:
ORIGINAL: function getView($controller, $path) {
CHANGES: function getView(Page $controller, $path) {

That seemed to clear that warning and fix the problem.
Reply all
Reply to author
Forward
0 new messages