Re: How to define a global function in bootstap.php?

2008-04-16 Thread TechSteve
the way putting the functions in vendors may be not quite understandable. but it you think of the reusing or redistributing possibilities of the functions, it may make you more sense. that is what I understand. cheers, steve On Apr 16, 7:36 am, Sourabh Sharma <[EMAIL PROTECTED]> wrote: > But i

Re: How to define a global function in bootstap.php?

2008-04-16 Thread Sourabh Sharma
But i think we have to use the vendors for 3rd party integration. for simple functions we don't need to declare the functions in vendors folder. Thanks & Regards Sourabh Sharma On Apr 16, 5:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I asked something similar a while back and I bel

Re: How to define a global function in bootstap.php?

2008-04-16 Thread [EMAIL PROTECTED]
I asked something similar a while back and I believe the preferred way of including your own functions goes like this. Put your functions in a file in your "vendors" folder. Either one will do. Include your file in bootstrap.php using App::import('Vendor', 'basics'); That is the most Cake-friend

Re: How to define a global function in bootstap.php?

2008-04-16 Thread Sourabh Sharma
If You want declare the global functions for your application then you have create a file in parallel to bootstrap.php like commonfunctions.php or if you want to declare the constants for your application like constants.php Then you have to include the both the files in the bootstap.php then you

Re: How to define a global function in bootstap.php?

2008-04-15 Thread Daniel Hofstetter
Hi Freshow, > how to define a global function for all controllers in ./app/confing/ > bootstap.php ,and how to inplement it in controller ? If it is a function only used by controllers then I would add it to the AppController (app/app_controller.php) and not to bootstrap.php. Hope that helps.

How to define a global function in bootstap.php?

2008-04-15 Thread Freshow
how to define a global function for all controllers in ./app/confing/ bootstap.php ,and how to inplement it in controller ? :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group,