This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » General discussion » Overriding the front controller dispatch method
Overriding the front controller dispatch method [message #15715] Fri, 10 November 2006 15:33 Go to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Hi all

I have reset my factories.yml to use "myWebFrontController", which I have ensured is being instantiated by my application. I have also created a dispatch() method in this, which essentially calls parent::dispatch(), but I have wrapped it in a try block so I can catch any Propel errors sitewide (eg if the database server is down).

However this dispatch() method in my class appears not to being called, so I think I have misunderstood the API. Can anyone shed any light?

Thanks Very Happy


Remember Palestine
Re: Overriding the front controller dispatch method [message #15716 is a reply to message #15715 ] Fri, 10 November 2006 15:48 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Aha - actually, the dispatch() method is called. But something is making a database connection beforehand, so if the database server is down, my method will try to catch it too late.

Would a better technique be to wrap a try() block around the require_once call to config.php in the front controller?


Remember Palestine
Re: Overriding the front controller dispatch method [message #15981 is a reply to message #15715 ] Wed, 15 November 2006 15:36 Go to previous message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Ping. Any thoughts? Smile


Remember Palestine
Previous Topic:Symfony Securitiy Issue - validation bypass method
Next Topic:Sessions not port sensitive - bug?
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software