Lost with Zend Framework and MVC [RESOLVED, sans solution]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
ReverendDexter
Forum Contributor
Posts: 193
Joined: Tue May 29, 2007 1:26 pm
Location: Chico, CA

Lost with Zend Framework and MVC [RESOLVED, sans solution]

Post by ReverendDexter »

I'm currently trying to add some functionality to a web page that was written by someone else, and am feeling totally lost.

Currently, there's a "front" area that anyone can access, and a member area that requires a login. The public area is all static html, the member area is all php MVC architecture built on the Zend Framework. In the member area is an events calendar that I would like to make publicly viewable. Currently, I have taken the event controller, cut out everything but what (I think) I need to view the events, and turned that into it's own controller class, "calendar".

Now where I get lost is in trying to "call" my calendar controller. The front controller usually gets bootstrapped when someone accesses the index page within the members subdirectory, so I'm not sure what I would need to do to call it from within the site's root dir. Do I basically need to copy over the whole bootstrapping into my calendar page? Or...? The only other thought I've had is to create another application that just accesses the same db and displays the events, but that seems superfluous when there's already functionality to display them!

I've been reading what I can about the Zend controllers (front and otherwise), and I think I understand enough to make it all play nice with itself, but still at a loss as to how to get it to show the one page.

Any help/pointers would be appreciated.
Last edited by ReverendDexter on Mon Aug 06, 2007 6:07 pm, edited 1 time in total.
User avatar
ReverendDexter
Forum Contributor
Posts: 193
Joined: Tue May 29, 2007 1:26 pm
Location: Chico, CA

Post by ReverendDexter »

It had been a few days since I last worked on this, looking at it again, I realized that I'm already including the bootstrap file into the publicly accessible page, however, I'm getting a "Fatal error: Class 'blah' not found in C:\...\members\index.php on line 35', where blah is referencing my calendar controller class. Line 35 is the instantiation of the view object (?!).

I'm starting to think that maybe my routing is incomplete?
Begby
Forum Regular
Posts: 575
Joined: Wed Dec 13, 2006 10:28 am

Post by Begby »

There are a million parts to this that could be messing up...

Post the relevant parts of your controller script, your bootstrap file, your view, the exact URL that is making it crap out, and anything else you feel might be of importance. Then indicate where you think things might be going awry.
User avatar
ReverendDexter
Forum Contributor
Posts: 193
Joined: Tue May 29, 2007 1:26 pm
Location: Chico, CA

Post by ReverendDexter »

Okay, got this working.
Post Reply