Basic things about Yii::app() properties

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:

  1. Yii::app() will return the CApplication, right?

  2. 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.

  3. But I couldn’t find user and homeUrl within the property list in the class inheritance tree.

  4. Can you tell me where I am wrong?

Thank you!

Nicolas

Yii::app() returns CWebApplication instance (for web-applications of course :) )

but I couldn’t find user and homeUrl in CApplication’s property list. Do yo know why?

ohhhh, I see.

It’s CWebApplication, not CApplication. Thanks!