bootstrap.php?

On Oct 19, 1:20 pm, Smelly_Eddie <[EMAIL PROTECTED]> wrote:
> Better yet.
>
> What area should I add code to load Persistent Global variables across
> all my pages.
>
> That way i can just load all my settings at first visit, and skip all
> this trouble.
>
> __SITE_SETTINGS['BotcheckMinMax'];
> __SITE_SETTINGS['SiteName'];
> __SITE_SETTINGS['Tagline'];
> etc..
>
> I;m thinking I'll call the model from the *app_controller*, and pass
> the settings back as an array to set as a global variable.
>
> On Oct 18, 7:36 pm, Pablo Viojo <[EMAIL PROTECTED]> wrote:
>
> > Sent from my iPhone
>
> > On 18-10-2008, at 17:07, Smelly_Eddie <[EMAIL PROTECTED]> wrote:
>
> > > I am having some trouble with the proper way to go about modeling
> > > this. I would love suggestions.
>
> > > I have a simple database with an id, key and value fields.   I made an
> > > administrative model, controller and views to add and manage the table
> > > of options.
>
> > > I have some functions in the model that return values based on the
> > > criteria, and I can call this from any controller easily.
> > > $minMax= $this->Setting->getBotcheckMinMax();
>
> > > I need a clean way to let models access the data within this table.
> > > And I don't want to use relationships because the records really
> > > relate specifically to any model, but may be used by any.
>
> > > I tried importing via;
> > > App::import('Model'.'Setting')
>
> > $Setting = new Setting();
> > $Setting->getMinMax()
>
> > > Setting::getMinMax()
>
> > > But it died trying to connect to the table once the settings method
> > > was called.
>
> > > It would be nice to build a component that could be access by the
> > > model.  I just don't want to bulk up every controller that wants to
> > > use some settings. It would be nicer to keep that in the models.
>
> > > Regards,
> > > Eddie
--~--~---------~--~----~------------~-------~--~----~
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