I'm not sure that you can, I think bootstrap is loaded before any of
the model classes. Put your code in app_controller.php
beforeFilter(). If you're using 1.2 check out the Configure class as
well.
On Dec 16, 9:21 am, glastoveteran <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Sorry for the stupid question, but how can I access a model's function
> (.e.g. findAll) from bootstrap.php?
>
> i.e. I have configuration parameters stored in a db table and I want
> to set them as constants at startup time. My model name is Parameter
> (parameter.php).
>
> // something like
> $parameters = $this->model->Parameter->findAll();
> foreach ($parameters as $parameter) {
> define($parameter['Parameter']['name'], $parameter['Parameter']
> ['value']);
>
> }
>
> Thanks, Alex
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---