Re: [PHP] Json.php

2007-04-20 Thread Jochem Maas
Richard Lynch wrote: On Thu, April 19, 2007 2:25 am, Roman Neuhauser wrote: I'm at a complete loss then. Richard, what would you advise to someone in such a messy situation? I don't really see why anybody is getting bent out of shape about 'almostatic' methods in PHP, but if they're maybe

Re: [PHP] Json.php

2007-04-20 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-20 10:19:04 +0200: Richard Lynch wrote: On Thu, April 19, 2007 2:25 am, Roman Neuhauser wrote: I'm at a complete loss then. Richard, what would you advise to someone in such a messy situation? I don't really see why anybody is getting bent out of shape

Re: [PHP] Json.php

2007-04-20 Thread Richard Lynch
On Fri, April 20, 2007 3:19 am, Jochem Maas wrote: Richard Lynch wrote: On Thu, April 19, 2007 2:25 am, Roman Neuhauser wrote: I'm at a complete loss then. Richard, what would you advise to someone in such a messy situation? I don't really see why anybody is getting bent out of shape about

Re: [PHP] Json.php

2007-04-19 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-19 02:19:14 +0200: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-04-18 11:54:59 +0200: but a practical question for you Roman (seeing as your very much into OOP), I'm not very much into OOP, I'm very much into programming techniques that allow me to

Re: [PHP] Json.php

2007-04-19 Thread Jochem Maas
Roman Neuhauser wrote: ... You'll have to change the code. I'm suggesting a nice clean way that'll not only conform to the probable rules of PHP 6 (which are not specific to PHP, at least static is not), but that'll also conform to the rules of good design. You're saying the changes are

Re: [PHP] Json.php

2007-04-19 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-19 10:50:19 +0200: Roman Neuhauser wrote: I wouldn't do it that way. A single class should not be a database driver *and* manage connections. fair enough, although personally I find that going a bit far, I don't see the win in splitting up the 'driver' and

Re: [PHP] Json.php

2007-04-19 Thread Richard Lynch
On Thu, April 19, 2007 2:25 am, Roman Neuhauser wrote: I'm at a complete loss then. Richard, what would you advise to someone in such a messy situation? I don't really see why anybody is getting bent out of shape about 'almostatic' methods in PHP, but if they're maybe gonna go away, roll out

Re: [PHP] Json.php

2007-04-18 Thread Jochem Maas
Richard Lynch wrote: On Tue, April 17, 2007 4:40 pm, Jochem Maas wrote: Richard Lynch wrote: So only one of these is kosher static: return Services_JSON::decode($data); class: $json = new Services_JSON; return $json-decode($data); but not both. ah yes that holy war, it's a

Re: [PHP] Json.php

2007-04-18 Thread Chris Boget
So only one of these is kosher static: return Services_JSON::decode($data); class: $json = new Services_JSON; return $json-decode($data); but not both. I'm not trying to start (or further add fuel to) any kind of war but instead an earnest question: why not both? thnx, Chris -- PHP

Re: [PHP] Json.php

2007-04-18 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-18 04:59:48 -0400: So only one of these is kosher static: return Services_JSON::decode($data); class: $json = new Services_JSON; return $json-decode($data); but not both. I'm not trying to start (or further add fuel to) any kind of war but instead an

Re: [PHP] Json.php

2007-04-18 Thread Jochem Maas
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-04-18 04:59:48 -0400: So only one of these is kosher static: return Services_JSON::decode($data); class: $json = new Services_JSON; return $json-decode($data); but not both. I'm not trying to start (or further add fuel to) any kind of war

Re: [PHP] Json.php

2007-04-18 Thread Tijnema !
On 4/17/07, Richard Lynch [EMAIL PROTECTED] wrote: On Mon, April 16, 2007 10:20 am, Tijnema ! wrote: And btw, I think it's better not to create a new link to the class each time the function is called, but just use :: if (!function_exists('json_encode')) { function json_encode($data)

Re: [PHP] Json.php

2007-04-18 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-18 11:54:59 +0200: Roman Neuhauser wrote: That's an incident waiting to happen, and forbidding static calls of instance methods is an (intended) anti-footshooting measure. nothing an isset($this) didn't/doesn't solve - they gave me the php gun, so let me

Re: [PHP] Json.php

2007-04-18 Thread Jochem Maas
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-04-18 11:54:59 +0200: Roman Neuhauser wrote: That's an incident waiting to happen, and forbidding static calls of instance methods is an (intended) anti-footshooting measure. nothing an isset($this) didn't/doesn't solve - they gave me the php

Re: [PHP] Json.php

2007-04-18 Thread Richard Lynch
On Wed, April 18, 2007 3:59 am, Chris Boget wrote: So only one of these is kosher static: return Services_JSON::decode($data); class: $json = new Services_JSON; return $json-decode($data); but not both. I'm not trying to start (or further add fuel to) any kind of war but instead an

Re: [PHP] Json.php

2007-04-18 Thread Richard Lynch
On Wed, April 18, 2007 4:27 am, Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-04-18 04:59:48 -0400: So only one of these is kosher static: return Services_JSON::decode($data); class: $json = new Services_JSON; return $json-decode($data); but not both. I'm not trying to start (or

Re: [PHP] Json.php

2007-04-17 Thread Jochem Maas
Richard Lynch wrote: On Mon, April 16, 2007 10:20 am, Tijnema ! wrote: And btw, I think it's better not to create a new link to the class each time the function is called, but just use :: if (!function_exists('json_encode')) { function json_encode($data) { return

Re: [PHP] Json.php

2007-04-17 Thread Richard Lynch
On Tue, April 17, 2007 4:40 pm, Jochem Maas wrote: Richard Lynch wrote: On Mon, April 16, 2007 10:20 am, Tijnema ! wrote: And btw, I think it's better not to create a new link to the class each time the function is called, but just use :: if (!function_exists('json_encode')) {

Re: [PHP] Json.php

2007-04-16 Thread Jochem Maas
Otto Wyss wrote: Tijnema ! wrote: *ROFLMFAO*...Did you actually try google for json.php? Second result: http://mike.teczno.com/JSON/JSON.phps This doesn't have a json_encode but needs a $json object which then could be used as $json-encode(...). Thanks anyway. that's going to make it

Re: [PHP] Json.php

2007-04-16 Thread Otto Wyss
Jochem Maas wrote: that's going to make it completely impossible to use then isn't it. no way you could possibly wrap the class/objects functionality in a wrapper function. At the moment it's sufficient, since I've now time to figure out how the Json package can be installed. Then I can

Re: [PHP] Json.php

2007-04-16 Thread Philip Thompson
On Apr 16, 2007, at 4:40 AM, Jochem Maas wrote: Otto Wyss wrote: Tijnema ! wrote: *ROFLMFAO*...Did you actually try google for json.php? Second result: http://mike.teczno.com/JSON/JSON.phps This doesn't have a json_encode but needs a $json object which then could be used as

Re: [PHP] Json.php

2007-04-16 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-16 14:03:55 +0200: Jochem Maas wrote: that's going to make it completely impossible to use then isn't it. no way you could possibly wrap the class/objects functionality in a wrapper function. At the moment it's sufficient, since I've now time to figure out

Re: [PHP] Json.php

2007-04-16 Thread tedd
At 8:41 AM -0500 4/16/07, Philip Thompson wrote: On Apr 16, 2007, at 4:40 AM, Jochem Maas wrote: Otto Wyss wrote: Tijnema ! wrote: *ROFLMFAO*...Did you actually try google for json.php? Second result: http://mike.teczno.com/JSON/JSON.phps This doesn't have a json_encode but needs a $json

Re: [PHP] Json.php

2007-04-16 Thread Robert Cummings
On Mon, 2007-04-16 at 10:49 -0400, tedd wrote: At 8:41 AM -0500 4/16/07, Philip Thompson wrote: On Apr 16, 2007, at 4:40 AM, Jochem Maas wrote: Otto Wyss wrote: Tijnema ! wrote: *ROFLMFAO*...Did you actually try google for json.php? Second result: http://mike.teczno.com/JSON/JSON.phps

Re: [PHP] Json.php

2007-04-16 Thread Jochem Maas
Robert Cummings wrote: On Mon, 2007-04-16 at 10:49 -0400, tedd wrote: At 8:41 AM -0500 4/16/07, Philip Thompson wrote: On Apr 16, 2007, at 4:40 AM, Jochem Maas wrote: Otto Wyss wrote: Tijnema ! wrote: *ROFLMFAO*...Did you actually try google for json.php? Second result:

Re: [PHP] Json.php

2007-04-16 Thread Tijnema !
On 4/16/07, Jochem Maas [EMAIL PROTECTED] wrote: Otto Wyss wrote: Tijnema ! wrote: *ROFLMFAO*...Did you actually try google for json.php? Second result: http://mike.teczno.com/JSON/JSON.phps This doesn't have a json_encode but needs a $json object which then could be used as

Re: [PHP] Json.php

2007-04-16 Thread Richard Lynch
On Sat, April 14, 2007 3:11 am, Otto Wyss wrote: I've seen a json.php file somewhere in a project for cases where the json module isn't installed (e.g. PHP4), yet I can't find that project again. Is there an official or unofficial download site for json.php? Why isn't this available in the

Re: [PHP] Json.php

2007-04-16 Thread Richard Lynch
On Mon, April 16, 2007 9:33 am, Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-04-16 14:03:55 +0200: Jochem Maas wrote: that's going to make it completely impossible to use then isn't it. no way you could possibly wrap the class/objects functionality in a wrapper function. At the

Re: [PHP] Json.php

2007-04-16 Thread Richard Lynch
On Mon, April 16, 2007 10:20 am, Tijnema ! wrote: And btw, I think it's better not to create a new link to the class each time the function is called, but just use :: if (!function_exists('json_encode')) { function json_encode($data) { return

Re: [PHP] Json.php

2007-04-15 Thread Otto Wyss
Tijnema ! wrote: *ROFLMFAO*...Did you actually try google for json.php? Second result: http://mike.teczno.com/JSON/JSON.phps This doesn't have a json_encode but needs a $json object which then could be used as $json-encode(...). Thanks anyway. O. Wyss -- PHP General Mailing List

Re: [PHP] Json.php

2007-04-15 Thread Otto Wyss
Satyam wrote: www.json.org lists all json resources in any language you care to think of. I must admit I haven't checked each reference but the ones I have have only packages to install and not a PHP source. Maybe I wasn't clear when asking. O. Wyss -- PHP General Mailing List

[PHP] Json.php

2007-04-14 Thread Otto Wyss
I've seen a json.php file somewhere in a project for cases where the json module isn't installed (e.g. PHP4), yet I can't find that project again. Is there an official or unofficial download site for json.php? Why isn't this available in the PHP manual

Re: [PHP] Json.php

2007-04-14 Thread Tijnema !
On 4/14/07, Otto Wyss [EMAIL PROTECTED] wrote: I've seen a json.php file somewhere in a project for cases where the json module isn't installed (e.g. PHP4), yet I can't find that project again. Is there an official or unofficial download site for json.php? Why isn't this available in the PHP

Re: [PHP] Json.php

2007-04-14 Thread Satyam
www.json.org lists all json resources in any language you care to think of. Satyam - Original Message - From: Otto Wyss [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, April 14, 2007 10:11 AM Subject: [PHP] Json.php I've seen a json.php file somewhere in a project for cases