Re: [PHP] Should I go with the Singleton Pattern or wait for 5.3?

2008-07-15 Thread Luigi Perroti
On Tue, Jul 15, 2008 at 2:10 AM, Chris wrote: Is this a decision for the whole project or just one particular part of it? Can that one part be put off until later or does it need to be done first? This decision will impact the whole project. I think that maybe I should go with the Singleton

[PHP] Should I go with the Singleton Pattern or wait for 5.3?

2008-07-14 Thread Luigi Perroti
Hello, I'm planning out a simple project and most probably I will need the functionality provided by the Singleton pattern. However with the next 5.3 release I would be able to conveniently use classes directly without instancing them. This would be a comparable option thanks to late state binding

[PHP] Passing arguments as they are received to another function

2008-07-12 Thread Luigi Perroti
Hello, I'm trying to implement a few simple wrappers for some PHP functions. Here's an example of what I'm trying to do: function myWrapper() { return defaultPhpFunction(func_get_args()); } The example above is broken since I'm just passing an array to the original function. The only way

Re: [PHP] Passing arguments as they are received to another function

2008-07-12 Thread Luigi Perroti
On Sat, Jul 12, 2008 at 6:00 PM, James Dempster wrote: You might want to take a look at http://php.net/manual/en/function.call-user-func-array.php Thank you very much for your suggestion. I've looked into it but I guess this doesn't work with what I'm trying to do, although what you

Re: [PHP] Passing arguments as they are received to another function

2008-07-12 Thread Luigi Perroti
On Sat, Jul 12, 2008 at 6:42 PM, James Dempster [EMAIL PROTECTED] wrote: On the line where you have self::$statement-call_user_func_array(array('PDOStatement','bindParam'),func_get_args()); try this call_user_func_array(array(self::$statement,'bindParam'),func_get_args()); see if that