I use var $uses for the primary model of the controller
e.g.
Posts => uses Post
Contact => uses Tools.Contact (Plugin model)
MembersController => uses User
Account => uses User
etc

I also think this is the normal use case for this property and would
never put more than one model into it.
The main reason you got that is that there are controllers (see
Account) that need to use a custom model (inflections won't work
here).
that's why you can override it manually.
it most cases, of course, you don't even have to touch this property.



On 20 Dez., 01:11, roundrightfarm <roundrightf...@gmail.com> wrote:
> Is there ever a time when it is considered best practices to use var
> $uses for access to a model from a controller.  The cakephp manual
> seems to say to use $this->Model->AssociatedModel when there is an
> association and $this->loadModel('UnassociatedModel') when there
> isn't.  Does var $uses not appear in well written code?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to