Re: [PHP] How do YOU set default function/method params?

2009-10-19 Thread Thodoris
Here is a problem that I have had for years now. I have been trying to come up with the perfect solution for this problem. But, I have come down to two different methods for solving it. Here is the problem... ?php function sendEmail( $to, $from, $subject, $body,

Re: [PHP] How do YOU set default function/method params?

2009-10-17 Thread Carlos Medina
Jim Lucas schrieb: Stephan Ebelt wrote: On Mon, Oct 05, 2009 at 05:48:32PM -0700, Jim Lucas wrote: Here is a problem that I have had for years now. I have been trying to come up with the perfect solution for this problem. But, I have come down to two different methods for solving it. Here

Re: [PHP] How do YOU set default function/method params?

2009-10-12 Thread Stephan Ebelt
On Sun, Oct 11, 2009 at 01:17:00PM -0700, Jim Lucas wrote: Stephan Ebelt wrote: On Mon, Oct 05, 2009 at 05:48:32PM -0700, Jim Lucas wrote: Here is a problem that I have had for years now. I have been trying to come up with the perfect solution for this problem. But, I have come down to

Re: [PHP] How do YOU set default function/method params?

2009-10-12 Thread David Otton
2009/10/12 Stephan Ebelt s...@shared-files.de: as far as I understood/use it: I try to hardcode as many workable defaults in the vo class as possible (ie. see $subject in the example). Then I create objects by passing result records from the database (arrays) to the constructor. That either

Re: [PHP] How do YOU set default function/method params?

2009-10-12 Thread Stephan Ebelt
On Mon, Oct 12, 2009 at 01:44:56PM +0100, David Otton wrote: 2009/10/12 Stephan Ebelt s...@shared-files.de: as far as I understood/use it: I try to hardcode as many workable defaults in the vo class as possible (ie. see $subject in the example). Then I create objects by passing

Re: [PHP] How do YOU set default function/method params?

2009-10-11 Thread Stephan Ebelt
On Mon, Oct 05, 2009 at 05:48:32PM -0700, Jim Lucas wrote: Here is a problem that I have had for years now. I have been trying to come up with the perfect solution for this problem. But, I have come down to two different methods for solving it. Here is the problem... [...] Now, we

Re: [PHP] How do YOU set default function/method params?

2009-10-11 Thread Jim Lucas
Stephan Ebelt wrote: On Mon, Oct 05, 2009 at 05:48:32PM -0700, Jim Lucas wrote: Here is a problem that I have had for years now. I have been trying to come up with the perfect solution for this problem. But, I have come down to two different methods for solving it. Here is the problem...

RE: [PHP] How do YOU set default function/method params?

2009-10-06 Thread Mert Oztekin
(with if() ones) seems more readable than other ones. -Original Message- From: Jim Lucas [mailto:li...@cmsws.com] Sent: Tuesday, October 06, 2009 4:21 AM To: Eddie Drapkin Cc: php General List Subject: Re: [PHP] How do YOU set default function/method params? Eddie Drapkin wrote: On Mon

Re: [PHP] How do YOU set default function/method params?

2009-10-06 Thread Jim Lucas
paragasu wrote: why bother, i use available good library http://swiftmailer.org/ Ok, bad example. I already use SwiftMailer. My problem though has nothing to do with sending an email. I should have known someone would take it too literally. Think a little more general. This is not a

Re: [PHP] How do YOU set default function/method params?

2009-10-06 Thread Jim Lucas
Mert Oztekin wrote: IMO, array_merge() is easy to use, however it suppose to use more cpu than other options. If you are a performance freak, i suggest you to not choose array_merge() solution. (also you execute date() and md5() functions even if you wont need to use them) In the other

Re: [PHP] How do YOU set default function/method params?

2009-10-05 Thread Eddie Drapkin
On Mon, Oct 5, 2009 at 8:48 PM, Jim Lucas li...@cmsws.com wrote: Here is a problem that I have had for years now.  I have been trying to come up with the perfect solution for this problem.  But, I have come down to two different methods for solving it. Here is the problem... ?php

Re: [PHP] How do YOU set default function/method params?

2009-10-05 Thread Jim Lucas
Eddie Drapkin wrote: On Mon, Oct 5, 2009 at 8:48 PM, Jim Lucas li...@cmsws.com wrote: Here is a problem that I have had for years now. I have been trying to come up with the perfect solution for this problem. But, I have come down to two different methods for solving it. Here is the

Re: [PHP] How do YOU set default function/method params?

2009-10-05 Thread paragasu
why bother, i use available good library http://swiftmailer.org/ On 10/6/09, Jim Lucas li...@cmsws.com wrote: Eddie Drapkin wrote: On Mon, Oct 5, 2009 at 8:48 PM, Jim Lucas li...@cmsws.com wrote: Here is a problem that I have had for years now. I have been trying to come up with the