hi, please help me starting development in yii

hi all

I was earlier developing apps with Cakephp, i heard about yii and its features. i now want to start developing in yii, im seeing docs and blog tutorial, one little thing is confusing me, though it may be very basic thing:

In yii, like bellow cod eexample:


class UserIdentity extends CUserIdentity


private $ id;

public function authenticate()





$this->errorCode=self::ERROR USERNAME INVALID;

else if(md5($this->password)!==$user->password)

what does User::model()->find() in the line


reffer too ??

because we reffed objects like this


why at many places "::" (double column) is being used? what is its significant.

Please help, this is confusing me in learning yii

Thanx in advance


you can refer the php manual to see that.

the double colon

You can think of the expression SomeModel::model() as a singleton, it returns one shared instance of SomeModel, created on first call.


I know we can access static method/properties without instantiating the class with double colon like



But what significant it have in above line of code ?

is mode() a static method of class "User" ?

Please explain a bit.


There is explanation in Yii document.

Class Reference for CActiveRecord

Thanx , i got the idea.