Ok, so looking a little deeper, the problem seems to stem from the
fact in loading models, basics.php gets a list of models to load from
listClasses, but then doesn't load them based on the inheritance tree
...

The problem can be mitigated by using require_once() instead of
require() in loadModels(), and then explicitly include_once-ing the
parent class in the child class file.

Curious as to why it was made this way, and would it be an issue to
change that code to 'require_once'?



On 8/17/06, riverfr0zen <[EMAIL PROTECTED]> wrote:
>
> Hi there - under app/models I have Vehicle extending Model. I would now
> like to create Car and Scooter, which should extend Vehicle.
>
> I'm probably missing something really dumb, but I'm not sure what the
> right way to include Vehicle is - trying the usual
> include_once/require_once returns an error that Vehicle has already
> been declared - however, without those, I get an error saying Vehicle
> is undefined.
>
> Tried to use $uses = array('Vehicle', 'Car') in the controller, but no
> dice. Can anyone help?
>
>
> >
>


-- 
Best,
Irfan Baig

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

Reply via email to