Say you have two plugins, A and B.

It is fairly simple for a component/behavior/helper in plugin B to
inherit from a component/behavior/helper in A by doing an
App::import(), then extending.

But, it is more complicated for controllers/models in plugin B to
inherit from their peers in plugin A, since each already extends its'
own respective PluginAppController and PluginAppModel.

Obviously, inheritance between plugins can't happen for controllers/
models.

So ... thinking out loud...

We can transfer the functions from the model in plugin A into a
behavior. Then the model in plugin B can attach that behavior straight
out of plugin A. That might work for functions.

But how might model B inherit the instance variables in model A
(associations, validation rules, etc.) ?

Perhaps in the constructor of B, we can instantiate model A, access
it's instance variables, and assign them to B's instance variables.

Does anyone have any opinions on whether this might/might not sit
nicely with the other stuff cake does on initialization?  Good idea/
Bad idea?

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 [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