On May 14, 2007, at 10:34 AM, Ming wrote:

>
> Hi,
>
> I am a newbie to cake. I just read cake's manual and have a quick
> question:
>
> class User extends AppModel
> {
>     // Its always good practice to include this variable.
>     var $name = 'User';
>
> what does this $name mean?

It's a way to ensure the classname for the model is always correct,  
especially under PHP4.

> is it mandatory?

No, but you may have problems if you don't include it when running on  
PHP4.

> Can I name it something
> else?

Yes.

> If I do not have this variable, how shall I make a reference to
> this mode in future?

You'd use classname to reference it in your controllers.

-- John

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to