Most of the time its just the model with the Singular name of the
controller. Cake yells at you if it does not exist.
If you are using the $uses array the rules change a bit. The primary
model for a controller becomes the first model specified in $uses.

-Rob
http://unend.com



On Aug 30, 12:05 pm, keymaster <[EMAIL PROTECTED]> wrote:
> I was using:
>
> $this->name
>
> to determine the controller, and:
>
> $this->modelClass
>
> to determine the model (for that controller).
>
> But, $this->modelClass does not always seem to be set to the current
> controller's model.
>
> There is another variable: $this->modelKey. Anyone know what that is?
>
> I also thought perhaps of doing:
>
> $inflector->singularize ($this->name)
>
> Any suggestions on the "cake" way to get a controllers main model?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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