Hi Simon,
> Hmm it just seems weird that it's not possible to go down this road..
> all I'm doing is simple OO.. I'm merely extending an object..
>
> I've considered another strategy, if you could comment on whether this
> strides against Cake I would appreciate it very much.
>
> Inspired by "Scaffold" i could do something like this:
>
> class Module extends Object {..}
>
> Then I implement logic in AppController that loads functions and
> properties from "Module" if "var $module;" is set, just like
> scaffolding works.
> Then "modules" are now a new abstract object in cake that wasn't there
> before, managing logic for controllers with the property of being a
> "module".
>
> Is this more in compliance with cake?
hmm, no, not really, at least not IMHO. A more cake way to do it would
be to have your usual controllers/models/views, which are _generally_
mapped to your data structure (but not always), and a single
app_controller. I would then abstract the functionality you require
for each 'module' into components, and either include them all in
app_controller, so all controllers have access to the one they need,
or add the correct one to each controllers own $components array.
Woudl you be able to abstract the code you need like this?
Cheers,
Jon
ps: lets keep this on-list please.
--
jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---