Re: FW: [PHP-DEV] Autoboxing in php 5.1

2005-02-15 Thread Rob Richards
You have to build an xmlNodeSet by hand. The DOMNodeList class wraps many different types of data to iterate (HastTables, xmlHashTables, nodeIterators, notationIterator, etc...). Everything works on live data so no xmlNodeSets are used since those are static. The iterators all work directly on

RE: FW: [PHP-DEV] Autoboxing in php 5.1

2005-02-14 Thread David Kingma | jool.nl
Hi Chegru -Original Message- I'm currently trying to add the Canonicalization functionality, but since I'm not a C expert, it takes a while :) Shouldn't be to hard, if your talking about the functions described at http://xmlsoft.org/html/libxml-c14n.html That's indeed what

Re: FW: [PHP-DEV] Autoboxing in php 5.1

2005-02-14 Thread Christian Stocker
On 14.2.2005 23:42 Uhr, David Kingma | jool.nl wrote: Hi Chegru -Original Message- I'm currently trying to add the Canonicalization functionality, but since I'm not a C expert, it takes a while :) Shouldn't be to hard, if your talking about the functions described at

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-13 Thread Greg Beaver
Marcus Boerger wrote: Hello Adam, ok, you propose a function to prepare the doc comments for further processing. While this seems a good idea at first glance it is not that easy as you typed it. The problem is that there are different tags some of which stop at the next tag, some are just valid

FW: [PHP-DEV] Autoboxing in php 5.1

2005-02-13 Thread David Kingma | jool.nl
Trachtenberg Cc: [EMAIL PROTECTED]; David Kingma | jool.nl; 'Andi Gutmans'; 'Sean Coates'; 'Ante Drnasin'; internals@lists.php.net Subject: Re: [PHP-DEV] Autoboxing in php 5.1 Hello Adam, ok, you propose a function to prepare the doc comments for further processing. While this seems a good

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-13 Thread Marcus Boerger
Hello Johannes, Saturday, February 12, 2005, 11:39:30 PM, you wrote: [...] While writing this mail I did some deeper look on the getDocComment stuff and found that my it doesn't work example[2] was the only case it doesn't work - just adding some statement behind the comment frees the

Re: FW: [PHP-DEV] Autoboxing in php 5.1

2005-02-13 Thread Christian Stocker
Cc: [EMAIL PROTECTED]; David Kingma | jool.nl; 'Andi Gutmans'; 'Sean Coates'; 'Ante Drnasin'; internals@lists.php.net Subject: Re: [PHP-DEV] Autoboxing in php 5.1 Hello Adam, ok, you propose a function to prepare the doc comments for further processing. While this seems a good idea at first

RE: [PHP-DEV] Autoboxing in php 5.1

2005-02-12 Thread David Kingma | jool.nl
-Original Message- Can't you use the reflection API to get the data? Not yet. My first feature request would be to add a getDocComment() to the ReflectionProperty class. You can generate a WSDL file using the reflection API but for the xml-schema part of the wsdl file you have to

RE: [PHP-DEV] Autoboxing in php 5.1

2005-02-12 Thread Andi Gutmans
I think the right way to implement this is in a development tools. There is other data that needs to be gathered for creating a WSDL file such as URI, authentication (if required) etc. Andi At 12:54 PM 2/12/2005 +0100, David Kingma | jool.nl wrote: -Original Message- Can't you use the

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-12 Thread Pierre-Alain Joye
On Sat, 12 Feb 2005 08:35:09 -0800 [EMAIL PROTECTED] (Andi Gutmans) wrote: I think the right way to implement this is in a development tools. There is other data that needs to be gathered for creating a WSDL file such as URI, authentication (if required) etc. I agree here. However having a:

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-12 Thread George Schlossnagle
On Feb 12, 2005, at 11:35 AM, Andi Gutmans wrote: I think the right way to implement this is in a development tools. There is other data that needs to be gathered for creating a WSDL file such as URI, authentication (if required) etc. Seems silly to have to use a development tool to do this. On

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-12 Thread Marcus Boerger
Hello David, did i miss something? ReflectionClass::getDocComment() should be pretty fine. marcus Saturday, February 12, 2005, 12:54:28 PM, you wrote: -Original Message- Can't you use the reflection API to get the data? Not yet. My first feature request would be to add a

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-12 Thread Pierre-Alain Joye
On Sat, 12 Feb 2005 12:26:06 -0500 [EMAIL PROTECTED] (George Schlossnagle) wrote: On Feb 12, 2005, at 11:35 AM, Andi Gutmans wrote: I think the right way to implement this is in a development tools. There is other data that needs to be gathered for creating a WSDL file such as URI,

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-12 Thread Andi Gutmans
Creating WSDL files in Java is usually done by the development tools. At 12:26 PM 2/12/2005 -0500, George Schlossnagle wrote: On Feb 12, 2005, at 11:35 AM, Andi Gutmans wrote: I think the right way to implement this is in a development tools. There is other data that needs to be gathered for

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-12 Thread Marcus Boerger
Hello Johannes, ups, reading again i see it, it was ReflectionProperty::getDocComment() Johannes had a patch for that already and i asked for it some months ago but i don't remember if there was anything against it. marcus Saturday, February 12, 2005, 6:45:22 PM, you wrote: Hello David,

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-12 Thread Adam Maccabee Trachtenberg
On Sat, 12 Feb 2005, Marcus Boerger wrote: ups, reading again i see it, it was ReflectionProperty::getDocComment() There's a generic getDocComment() method, but that just returns the entire blob. You then need to parse the blog using the preg functions to extract individual lines. It would be

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-12 Thread John Coggeshall
On Sat, 2005-02-12 at 12:57, Andi Gutmans wrote: Creating WSDL files in Java is usually done by the development tools. And one of the major benefits to SOAP in .NET is that it is done completely by the core. John -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-12 Thread Johannes Schlueter
Hi Marcus, On Saturday 12 February 2005 18:58, Marcus Boerger wrote: ups, reading again i see it, it was ReflectionProperty::getDocComment() Johannes had a patch for that already and i asked for it some months ago but i don't remember if there was anything against it. no, the

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-11 Thread Ante Drnasin
John Coggeshall wrote: To be clear: Although I think this might be implemented as some sort of object I am not interested in making objects out of everything. All I want is this: function foo(Integer $a, Float $b, String $c, Boolean $d) { } and be able to introspect against that... how that

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-11 Thread Andi Gutmans
I think phpDoc is the solution because especially as we start going into the web services realm we're going to need to document more complex signatures and this kind of syntax won't be sufficient anyway. We will need to have a way to document web services so that we can auto-generate WSDL

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-11 Thread Sean Coates
Andi Gutmans wrote: I think phpDoc is the solution because especially as we start going into the web services realm we're going to need to document more complex signatures and this kind of syntax won't be sufficient anyway. We will need to have a way to document web services so that we can

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-11 Thread Marcus Boerger
Hello Sean, Friday, February 11, 2005, 7:33:11 PM, you wrote: Andi Gutmans wrote: I think phpDoc is the solution because especially as we start going into the web services realm we're going to need to document more complex signatures and this kind of syntax won't be sufficient anyway. We

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-11 Thread Sebastian Bergmann
John Coggeshall wrote: I am only arguing the typehinting of primitives. I would like to see typehinting for primitives, too. -- Sebastian Bergmann http://www.sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 -- PHP

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-11 Thread Andi Gutmans
At 10:33 AM 2/11/2005 +0100, Sebastian Bergmann wrote: John Coggeshall wrote: I am only arguing the typehinting of primitives. I would like to see typehinting for primitives, too. Read the archives. There are good reasons why this wouldn't fit into PHP and the way it auto-juggles types. Andi

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-11 Thread Andi Gutmans
At 01:33 PM 2/11/2005 -0500, Sean Coates wrote: Andi Gutmans wrote: I think phpDoc is the solution because especially as we start going into the web services realm we're going to need to document more complex signatures and this kind of syntax won't be sufficient anyway. We will need to have a

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-11 Thread Marcus Boerger
Hello Andi, Friday, February 11, 2005, 8:51:16 PM, you wrote: At 01:33 PM 2/11/2005 -0500, Sean Coates wrote: Andi Gutmans wrote: I think phpDoc is the solution because especially as we start going into the web services realm we're going to need to document more complex signatures and this

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-11 Thread Andi Gutmans
Can't you use the reflection API to get the data? At 11:19 PM 2/11/2005 +0100, Marcus Boerger wrote: Hello Andi, Friday, February 11, 2005, 8:51:16 PM, you wrote: At 01:33 PM 2/11/2005 -0500, Sean Coates wrote: Andi Gutmans wrote: I think phpDoc is the solution because especially as we start

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-11 Thread Marcus Boerger
Hello Andi, you can but that would be different. You somehow have to know then what is there to parse and you couldn't write something like 'phpdoc' that requires correct syntax for both code and comment. marcus Friday, February 11, 2005, 11:23:40 PM, you wrote: Can't you use the reflection

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-10 Thread Ron Korving
Man, that's the primary reason I don't like Java :) You can't be serious :) Ron Ante Drnasin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Andrei Zmievski wrote: On Wed, 09 Feb 2005, Ante Drnasin wrote: Hi Marcus and thanx for the explanation And I agree that PHP is very

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-10 Thread Derick Rethans
On Thu, 10 Feb 2005, Ante Drnasin wrote: Andrei Zmievski wrote: On Wed, 09 Feb 2005, Ante Drnasin wrote: Hi Marcus and thanx for the explanation And I agree that PHP is very loose which is his strong part but exactly because of that I think it would be nice if the end-user can have

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-10 Thread Andrei Zmievski
On Thu, 10 Feb 2005, Ante Drnasin wrote: Why? - Andrei Why not? Because it would be a great asset to the new OOP model in PHP 5 You did't answer my question. Why? Because the new OOP model is great and I don't think it shouldn't stop there Why? Because it would be great

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-10 Thread John Coggeshall
You did't answer my question. Why? I am def. a fan of this idea. I'd love to see internally a set of Java-style objects representing the basic types in PHP. As for why I have two reasons: Although PHP is not a strongly-typed language and never will be, with the introduction of type-hinting I

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-10 Thread John Coggeshall
To be clear: Although I think this might be implemented as some sort of object I am not interested in making objects out of everything. All I want is this: function foo(Integer $a, Float $b, String $c, Boolean $d) { } and be able to introspect against that... how that ultimately gets

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-10 Thread Sara Golemon
function foo(Integer $a, Float $b, String $c, Boolean $d) { } Having that automagically translate to: function foo($a, $b, $c, $d) { set_type($a, 'int'); set_type($b, 'float'); set_type($c, 'string'); set_type($d, 'bool'); } Is something that I could see building into the language

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-10 Thread John Coggeshall
Is something that I could see building into the language (in all honesty, isn't that was zend_parse_parameters does for internal functions already?), but objects for primitives? Didn't someone say something about smelly corpses recently? maybe it was charred? cold? smoking? rank? I don't

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-10 Thread Sara Golemon
Is something that I could see building into the language (in all honesty, isn't that was zend_parse_parameters does for internal functions already?), but objects for primitives? Didn't someone say something about smelly corpses recently? maybe it was charred? cold? smoking? rank? I don't

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-10 Thread Greg Beaver
John Coggeshall wrote: object and maintain that WSDL alongside code changes manually? WSDL documents were designed to be generated automatically by the architecture exposing the web service, and without any notion of typing in PHP at all there is no viable way to really do this. Don't forget about

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-10 Thread Andi Gutmans
At 09:08 AM 2/10/2005 +0100, Ante Drnasin wrote: Why not? Because it would be a great asset to the new OOP model in PHP 5 Because the new OOP model is great and I don't think it shouldn't stop there Because it would be great if the choice is left to the end user... We already have OOP

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-10 Thread Adam Maccabee Trachtenberg
On Thu, 10 Feb 2005, Greg Beaver wrote: The best thing internals could do for WSDL is to add a documentation lexer to reflection, but I would be surprised if this happens - too complicated unless it's really crude :) I did something like this using getDocComment() and preg_match() for

[PHP-DEV] Autoboxing in php 5.1

2005-02-09 Thread Ante Drnasin
I was wondering if anyone can comment on this idea cause I think it would be a great asset to PHP and to OOP in PHP.. example: $b = 4; $a = new Integer(4); if($a == $b) { //bla bla } Other classes would include String(), Integer(), Boolean() ... and so on... -- PHP Internals - PHP Runtime

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-09 Thread Marcus Boerger
Hello Ante, autoboxing is an ugly java 1.5 workarount to enable storage of base tyoes in containers. There this trick is necessary because as always in java everything must be an 'Object'. In contrast PHP is a loosly typed language where a container aka array can store any type. Apart from that

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-09 Thread Ante Drnasin
Hi Marcus and thanx for the explanation And I agree that PHP is very loose which is his strong part but exactly because of that I think it would be nice if the end-user can have the ability to work with primitives like they were objects... I didn't want to suggest that PHP should implement

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-09 Thread Andrei Zmievski
On Wed, 09 Feb 2005, Ante Drnasin wrote: Hi Marcus and thanx for the explanation And I agree that PHP is very loose which is his strong part but exactly because of that I think it would be nice if the end-user can have the ability to work with primitives like they were objects... Why?