php-general Digest 3 Mar 2013 13:26:15 -0000 Issue 8146

2013-03-03 Thread php-general-digest-help
php-general Digest 3 Mar 2013 13:26:15 - Issue 8146 Topics (messages 320367 through 320369): Re: Introduction ... ! 320367 by: Tedd Sperling 320368 by: Tedd Sperling static Logging class? 320369 by: Lars Nielsen Administrivia: To subscribe to the digest, e-mail:

php-general Digest 4 Mar 2013 02:40:11 -0000 Issue 8147

2013-03-03 Thread php-general-digest-help
php-general Digest 4 Mar 2013 02:40:11 - Issue 8147 Topics (messages 320370 through 320375): Re: static Logging class? 320370 by: shiplu 320371 by: Ravi Gehlot 320372 by: Larry Garfield 320373 by: Lars Nielsen 320375 by: Ravi Gehlot Re: Holding

[PHP] static Logging class?

2013-03-03 Thread Lars Nielsen
Hi, I work on a little hobby-project, and i want to make a oo logging facility. (php5.3 oop) Is it best to make a class with static functions that i can call from my other classes? Or is it more appropriate to make a real logging-class i should instantiate every time i need to log something? (I

Re: [PHP] static Logging class?

2013-03-03 Thread Ravi Gehlot
Hello Lars, I would apply the Singleton Pattern where you would have 1 instance for you entire application. As far as whether or not to use a static method, I would weigh the options. If you just want to call a method that you know will not have to be changed in the future and that method will

Re: [PHP] static Logging class?

2013-03-03 Thread Larry Garfield
Make a real classed object that you pass to various objects that need it. Otherwise you make your life way harder for unit testing. Don't have a class that self-enforces that it's a singleton. That way lies pain. In particular, I recommend using or writing a class based on the PSR-3

Re: [PHP] static Logging class?

2013-03-03 Thread Lars Nielsen
Thanks a lot Larry! This PSR-3 looks just the way to do such things! :-) I hope i chat with you at DrupalCon Praha! http://www.linkedin.com/profile/view?id=18644639 Best regards Lars Nielsen Make a real classed object that you pass to various objects that need it. Otherwise you make your life

[PHP] Re: Holding datetimes in a DB.

2013-03-03 Thread Richard Quadling
On 1 March 2013 10:49, Richard Quadling rquadl...@gmail.com wrote: Hi. My heads trying to remember something I may or may not have known to start with. If I hold datetimes in a DB in UTC and can represent a date to a user based upon a user preference Timezone (not an offset, but a real

Re: [PHP] static Logging class?

2013-03-03 Thread Ravi Gehlot
Hello Larry, Thanks for sharing! - [image: logo] *Ravi Gehlot * Mobile: 407-283-5282 Orlando, FL 32765-8085 http://www.RaviGehlot.Net/ https://github.com/ravigehlot *First, solve the problem. Then, write the code.* [image: Twitter]

Re: [PHP] Introduction ... !

2013-03-03 Thread Ravi Gehlot
Hello Nick, Welcome to the list. I joined the list awhile back then unsubscribed for no apparent reason. This list was very active years ago. I came back about a few months ago just as a watcher. I didn't really post or participate at all. I guess, there are a lot of watchers only people here.

[PHP] Open form in new window

2013-03-03 Thread John Taylor-Johnston
I have many different submit button. input value=Update type=submit input name=DPRmode value=Enter Data type=submit When php processes value=Enter Data, I would like to open a new window, but only if I click this one. Possible? I knw ther is an HTML target= thingy. Can PHP do anything magic?

[PHP] Re: Open form in new window

2013-03-03 Thread Maciek Sokolewicz
On 4-3-2013 6:44, John Taylor-Johnston wrote: I have many different submit button. input value=Update type=submit input name=DPRmode value=Enter Data type=submit When php processes value=Enter Data, I would like to open a new window, but only if I click this one. Possible? I knw ther is an