Re: Load model or component under a different name

2011-05-20 Thread Miles J
Instantiate them separately, while one uses the controller property. $model = ClassRegistry::init('Email'); or $email = new EmailComponent(); On May 20, 8:32 am, dreamingmind wrote: > I think you could do this with the Model alias > property:http://api13.cakephp.org/class/model > > But that w

Re: Load model or component under a different name

2011-05-20 Thread dreamingmind
I think you could do this with the Model alias property: http://api13.cakephp.org/class/model But that would let you use a different name for your model rather than the component. Don On May 20, 8:17 am, Matthias wrote: > Hi, > I am about to use the email component, which is then accessible in

Load model or component under a different name

2011-05-20 Thread Matthias
Hi, I am about to use the email component, which is then accessible in the controller through $this->Email. For validating the form I created a model with the same name "Email", so it will also be accessed as $this- >Email. I like both names, so I would like to keep them. Is there a way to load one