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:

<?php

class UserIdentity extends CUserIdentity

{

private $ id;

public function authenticate()

{

$username=strtolower($this->username);

$user=User::model()->find(‘LOWER(username)=?’,array($username));

if($user===null)

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

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



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

$user=User::model()->find(‘LOWER(username)=?’,array($username));

reffer too ??

because we reffed objects like this

Object_name->method_name,

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

Sukhwinder

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.

/Tommy

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

e.g

[indent]class_name::static_method_name()[/indent]

But what significant it have in above line of code ?

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

Please explain a bit.

Thanx

There is explanation in Yii document.

Class Reference for CActiveRecord

Thanx , i got the idea.