Is a good idea have a BaseController and make all controllers extend that class?

后端 未结 4 857
粉色の甜心
粉色の甜心 2020-12-20 06:13

I need some common behaviors in all controllers. Is a good idea have a BaseController and make all controllers extend that class? If so, What is the correct way to avoid the

4条回答
  •  伪装坚强ぢ
    2020-12-20 06:43

    Yes it is good idea.

    What is the correct way to avoid the Fatal error: Class 'BaseController' not found error.

    You sholud read more about Zend_Loader, to avoid this error

提交回复
热议问题