2009年7月22日星期三

[fw-mvc] Overriding the Zend_Controller_Front::getInstance()?

Hi,

When I read the official zend framework programmer's reference guide - 12.3.5. Extending the Front Controller, I got the following text at the bottom of the page:

Overriding the getInstance() method ensures that subsequent calls to Zend_Controller_Front::getInstance() will return an instance of your new subclass instead of a Zend_Controller_Front instance -- this is particularly useful for some of the alternate routers and view helpers.

I don't understand why Zend_Controller_Front::getInstance() will return an instance of my new subclass only if I overriding the getInstance()method, and where I should put the overriding code.

Please can someone give me some advise?

Thanks
Yunfeng

没有评论: