[PHP] Array of PDO objects

2008-06-06 Thread Miguel J. Jiménez
Hi, I want to know if I can set an array with PDO objects, thus: $foo = array(new PDO(...), new PDO(...)); $oSt = $foo[0]-prepare(...); and so on... I tried that aproach and PHP is always complaining about using prepare() in a non-object... ---

[PHP] Method chaining off constructors

2008-06-06 Thread Christoph Boget
Is there a reason why you can't do method chaining off of constructors? Consider the following class: class bob { public function __construct() { echo 'Constructor()'; } public function one() { echo '-one()'; return $this; } public function

RE: [PHP] Method chaining off constructors

2008-06-06 Thread Boyd, Todd M.
-Original Message- From: Christoph Boget [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 9:45 AM To: PHP General Subject: [PHP] Method chaining off constructors Is there a reason why you can't do method chaining off of constructors? Consider the following class: class

RE: [PHP] Method chaining off constructors

2008-06-06 Thread Christoph Boget
Why? I thought constructors returned the object? It's been a while since I've played with objects in PHP, but couldn't you just add the line: return $this; ...to the end of your __construct() function? Sorry if this is obtuse of me to say, I just thought maybe the answer was that simple

Re: [PHP] Method chaining off constructors

2008-06-06 Thread Eric Butera
On Fri, Jun 6, 2008 at 11:00 AM, Christoph Boget [EMAIL PROTECTED] wrote: Why? I thought constructors returned the object? It's been a while since I've played with objects in PHP, but couldn't you just add the line: return $this; ...to the end of your __construct() function? Sorry if this

Re: [PHP] Method chaining off constructors

2008-06-06 Thread Adam Richardson
The 'new' keyword has to apply to the object created in the constructor (and not the return value of any of the follow-up calls.) To establish this precedence, chaining wasn't allowed on constructors. On Fri, Jun 6, 2008 at 11:04 AM, Eric Butera [EMAIL PROTECTED] wrote: On Fri, Jun 6, 2008

Re: [PHP] Method chaining off constructors

2008-06-06 Thread Christoph Boget
The 'new' keyword has to apply to the object created in the constructor (and not the return value of any of the follow-up calls.) To establish this precedence, chaining wasn't allowed on constructors. If precedence was the issue, why doesn't this work, either: (new bob())-one()-two() ?

Re: [PHP] Method chaining off constructors

2008-06-06 Thread Robert Cummings
On Fri, 2008-06-06 at 11:35 -0400, Christoph Boget wrote: The 'new' keyword has to apply to the object created in the constructor (and not the return value of any of the follow-up calls.) To establish this precedence, chaining wasn't allowed on constructors. If precedence was the

[PHP] spaces - not sure if this is a preg_match issue or a regexp issue

2008-06-06 Thread DeadTOm
I'm working on a script to look for a UUEncoded attachment in an NNTP message. I'm running into problems with spaces in the filename of the attachment. UUEncoded files in the body of a message will start with the word begin, then the size of the file, then the name of the file. Then the encoded

Re: [PHP] Array of PDO objects

2008-06-06 Thread Nathan Nobbe
2008/6/6 Miguel J. Jiménez [EMAIL PROTECTED]: Hi, I want to know if I can set an array with PDO objects, thus: $foo = array(new PDO(...), new PDO(...)); $oSt = $foo[0]-prepare(...); and so on... I tried that aproach and PHP is always complaining about using prepare() in a

Re: [PHP] Updating inherited attributes without __construct()

2008-06-06 Thread Nathan Nobbe
On Thu, Jun 5, 2008 at 12:15 PM, Tyson Vanover [EMAIL PROTECTED] wrote: I have a class that has a list of valid keys, and an array of values. When a value is added to the array it's key is first checked against the list of valid keys (this is to prevent injection issues we have been having

Re: [PHP] spaces - not sure if this is a preg_match issue or a regexp issue

2008-06-06 Thread Jim Lucas
DeadTOm wrote: I'm working on a script to look for a UUEncoded attachment in an NNTP message. I'm running into problems with spaces in the filename of the attachment. UUEncoded files in the body of a message will start with the word begin, then the size of the file, then the name of the file.

Re: [PHP] Updating inherited attributes without __construct()

2008-06-06 Thread Tyson Vanover
Sorry, I probably should have included the add() function from the parent. As well as all of the parent constructor. Basically the object takes an array of key=value pairs and parses them into a string for output. When it takes in the array of pairs it needs to check the keys against a

[PHP] Re: Sr. PHP Engineer job opportunity / Denver

2008-06-06 Thread Manuel Lemos
Hello, I have an immediate opportunity available for a Senior Software Engineer in Denver, CO (relocation assistance is available). This is a great opportunity to join a dynamic and growing Internet-based company. The individual will be responsible for the development, implementation, and

[PHP] WSDL/SOAP/PHP5

2008-06-06 Thread Dan Joseph
Hi Everyone, I'm struggling with a WSDL trying to make it work right. I don't even know what to really ask. Basically I've created a WSDL and made a web service in PHP5. It doesn't seem to validate properly when a .NET client tries to hit Is there something that can be used to generate the

Re: [PHP] WSDL/SOAP/PHP5

2008-06-06 Thread Nathan Nobbe
On Fri, Jun 6, 2008 at 2:53 PM, Dan Joseph [EMAIL PROTECTED] wrote: Hi Everyone, I'm struggling with a WSDL trying to make it work right. I don't even know what to really ask. Basically I've created a WSDL and made a web service in PHP5. It doesn't seem to validate properly when a .NET

Re: [PHP] WSDL/SOAP/PHP5

2008-06-06 Thread Eric Butera
On Fri, Jun 6, 2008 at 6:33 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Fri, Jun 6, 2008 at 2:53 PM, Dan Joseph [EMAIL PROTECTED] wrote: Hi Everyone, I'm struggling with a WSDL trying to make it work right. I don't even know what to really ask. Basically I've created a WSDL and made a

Re: [PHP] Updating inherited attributes without __construct()

2008-06-06 Thread Nathan Nobbe
On Fri, Jun 6, 2008 at 2:09 PM, Tyson Vanover [EMAIL PROTECTED] wrote: Sorry, I probably should have included the add() function from the parent. As well as all of the parent constructor. Basically the object takes an array of key=value pairs and parses them into a string for output. When