Yii: Zend's preDispatch and init analogon -


i have translate applications zend yii framework. since i'm new zend, wonder how implement controllers predispatch() , init() functions in yii. advice.

for init there same initfunction in yii controllers.

public function init() {     // initialization } 

for predispatch can use beforeaction, called before action - return true if want action executed, or false cancel execution.

protected function beforeaction($action) {               // logic before action     return true; } 

when ovveriding custom controller parent methods should called.

there usefull filter actions


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

c++ - End of file on pipe magic during open -