Hello,
1> Yes
2> Instance can also be created by $this->loadModel or by
App::uses('Posts', 'Controller'). App::uses is preferred.
On Sun, Jul 1, 2012 at 4:37 AM, Marcelo Custódio
<[email protected]>wrote:
> Suppose I have the classic Post model and I've created an Author model too.
>
> I have some basic questions:
>
> (1) The Post object is automatically created whithin the PostsController ?
>
> (2) In order to create an instance of Post whithin AuthorsController, is
> the only way with
>
> $this->Post = ClassRegistry::init('Post');
>
> Please notice that by doing " $this->Post " I assume the Post variable
> will be created in this line. Am I right ?
>
> Thank you in advance!
>
> --
> 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
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>
--
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
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php