That's not what models are for. Models are meant to represent an
entity of data from a datasource (database or rest), not to convene
helper methods. Cake creates even more confusion because their model
system isn't a true model system, it's simply a DAO (database access
object).

On Aug 11, 3:42 pm, Stephen Latham <[email protected]> wrote:
> I agree the model is a good place.  I recently wrote these type of global 
> actions in the app controller rather than bootstrap.php but found after 
> thought and discussion the model made more sense.
>
> On 11 Aug 2011, at 22:09, euromark <[email protected]> wrote:
>
>
>
>
>
>
>
> > usually in the model
> > since controllers can easily access models
>
> > but that depends on your situation
> > maybe a lib, maybe a behavior, maybe some boostrap code
>
> > without knowing more details, i go for model code
>
> > On 11 Aug., 22:30, BurningFuses <[email protected]> wrote:
> >> In my app I have a bunch of time related routines that I want to be
> >> able to call from my controllers and models. I could turn them into a
> >> component so they could be accessible on all my controllers, but they
> >> wouldn't be (in a trivial way or recommended way) be accessible from
> >> my models. Where should I put them? Is there a recommended cake
> >> guideline for such a thing?
> >> Thank you,
> >> Burningfuses
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > [email protected] For more options, visit this group 
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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