I guess so... Because of this I hoped there's a way to sneak it right
into AppModel automatically... ;-)

On Wed, Dec 15, 2010 at 12:13 AM, euromark <dereurom...@googlemail.com> wrote:
> and I would only do that if necessary
> lazyloading attachments so to speak
> probably cuts down the memory
>
>
> On 14 Dez., 17:06, Joshua Muheim <psybea...@gmail.com> wrote:
>> Thanks, amit.
>>
>> @Mark: You're completely right, but I have a component that assumes
>> that every model has this component attached, and it would be nice if
>> this attaching could be done automatically... So I guess I will have
>> to attach it to every single model, then.
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Dec 14, 2010 at 3:56 PM, euromark <dereurom...@googlemail.com> wrote:
>> > you never use the app model directly
>> > so there should be no need to do is on app model level dynamically
>>
>> > just hard-code it:
>>
>> > var $actsAs  = ...
>>
>> > On 14 Dez., 13:01, Amit Badkas <amit.sanis...@gmail.com> wrote:
>> >> Hi,
>>
>> >> You can use $this->Controller->MyModel->Behaviors->attached('MyBehavior');
>> >> code to check if a particular behavior attached to a particular model or 
>> >> not
>>
>> >> Amit Badkas
>>
>> >> PHP Applications for E-Biz:http://www.sanisoft.com
>>
>> >> On Tue, Dec 14, 2010 at 5:02 PM, Joshua Muheim <psybea...@gmail.com> 
>> >> wrote:
>> >> > Oh, and another question: should I check whether the model has already
>> >> > the behavior XYZ attached before trying to attach it? (I'm using many
>> >> > behaviors in different plugins etc., so it could happen that a
>> >> > behavior is attached more than once.)
>>
>> >> > On Tue, Dec 14, 2010 at 11:11 AM, psybear83 <psybea...@gmail.com> wrote:
>> >> > > Hey all
>>
>> >> > > I'd like to add a behavior to the AppModel on the fly from within a
>> >> > > component. Normally you do...
>>
>> >> > > $this->Controller->MyModel->Behaviors->attach('MyBehavior');
>>
>> >> > > ...but sadly for AppModel this doesn't work:
>>
>> >> > > $this->Controller->AppModel->Behaviors->attach('MyBehavior');
>>
>> >> > > ...results in:
>>
>> >> > > Fatal error: Call to a member function attach() on a non-object
>>
>> >> > > But I guess there IS a way to do that, isn't there? :-)
>>
>> >> > > Thanks for help,
>> >> > > Josh
>>
>> >> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
>> >> > others with their CakePHP related questions.
>>
>> >> > > You received this message because you are subscribed to the Google 
>> >> > > Groups
>> >> > "CakePHP" group.
>> >> > > To post to this group, send email to cake-php@googlegroups.com
>> >> > > To unsubscribe from this group, send email to
>> >> > > cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.c
>> >> > >  om>For more options, visit this group at
>> >> >http://groups.google.com/group/cake-php?hl=en
>>
>> >> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others
>> >> > with their CakePHP related questions.
>>
>> >> > You received this message because you are subscribed to the Google 
>> >> > Groups
>> >> > "CakePHP" group.
>> >> > To post to this group, send email to cake-php@googlegroups.com
>> >> > To unsubscribe from this group, send email to
>> >> > cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.c
>> >> >  om>For more options, visit this group at
>> >> >http://groups.google.com/group/cake-php?hl=en
>>
>> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
>> > with their CakePHP related questions.
>>
>> > You received this message because you are subscribed to the Google Groups 
>> > "CakePHP" group.
>> > To post to this group, send email to cake-php@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
>> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> 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?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en

Reply via email to