I am trying to make sense of the following code generated by Gii:
public function actionLogout()
{
Yii::app()->user->logout();
$this->redirect(Yii::app()->homeUrl);
}
Please correct if I am wrong:
-
Yii::app() will return the CApplication, right?
-
then I go to the Class reference document to find out about user and homeUrl, since app()->user, and Yii::app()->homeUrl make me think user and homeUrl are the property of CApplication.
-
But I couldn’t find user and homeUrl within the property list in the class inheritance tree.
-
Can you tell me where I am wrong?
Thank you!
Nicolas