Re: [PHP-DEV] Reflection API: Add ::getFullName() method.

2017-12-11 Thread Andreas Hennings
>> > >> > Obviously, the `\0` is horrible and can probably be improved: depends on >> > whether the API is intended for human or machine consumption. If it is >> > machine consumption, strings are the wrong approach anyway. >> >> Machine or human? >> One goal is that these names can be used as

Re: [PHP-DEV] Reflection API: Add ::getFullName() method.

2017-12-11 Thread Andreas Hennings
See http://php.net/manual/en/language.namespaces.rules.php What you mean is a "qualified name" so it would be a QN. On 11 December 2017 at 10:28, Marco Pivetta wrote: > Weird, that looks wrong to me, so I may be wrong here. > > When receiving a string containing a symbol,

Re: [PHP-DEV] Reflection API: Add ::getFullName() method.

2017-12-11 Thread Marco Pivetta
Weird, that looks wrong to me, so I may be wrong here. When receiving a string containing a symbol, the only sensible approach is to consider it a FQN, as no context is provided with the string. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Mon, Dec 11, 2017 at

Re: [PHP-DEV] Reflection API: Add ::getFullName() method.

2017-12-11 Thread Andreas Hennings
On 11 December 2017 at 10:16, Marco Pivetta wrote: > On Mon, Dec 11, 2017 at 10:03 AM, Andreas Hennings > wrote: >> >> On 11 December 2017 at 09:16, Marco Pivetta wrote: >> > If you really want to expose a symbol's FQN, >> >> Just to

Re: [PHP-DEV] Reflection API: Add static factories on ReflectionType

2017-12-11 Thread Andreas Hennings
On 11 December 2017 at 08:58, Marco Pivetta wrote: > What's the use-case for creating a userland `ReflectionType` instance, > besides mocking the reflection API itself? > Consider that the subclassing in userland already provides an easy way to > perform these operations

Re: [PHP-DEV] Reflection API: Add ::getFullName() method.

2017-12-11 Thread Marco Pivetta
On Mon, Dec 11, 2017 at 10:03 AM, Andreas Hennings wrote: > On 11 December 2017 at 09:16, Marco Pivetta wrote: > > If you really want to expose a symbol's FQN, > > Just to clarify: For me, "FQN" means "fully-qualified name", which > begins with "\\". >

Re: [PHP-DEV] Reflection API: Add ::getFullName() method.

2017-12-11 Thread Andreas Hennings
On 11 December 2017 at 09:16, Marco Pivetta wrote: > If you really want to expose a symbol's FQN, Just to clarify: For me, "FQN" means "fully-qualified name", which begins with "\\". This is specifically not what I propose here. I want the name without the leading namespace

Re: [PHP-DEV] Reflection API: Add ::getFullName() method.

2017-12-11 Thread Marco Pivetta
If you really want to expose a symbol's FQN, I suggest exposing the internal name as per `(array)` cast semantics. namespace A { class B { public $c; private $d; private $e; } } That would be: "A\B#\$c" "A\B#\0*\0\$d" "A\B#\0A\\B\0\$e" Obviously, the `\0` is

Re: [PHP-DEV] Reflection API: Add static factories on ReflectionType

2017-12-10 Thread Marco Pivetta
What's the use-case for creating a userland `ReflectionType` instance, besides mocking the reflection API itself? Consider that the subclassing in userland already provides an easy way to perform these operations (although ugly):

[PHP-DEV] Reflection API: Add static factories on ReflectionType

2017-12-10 Thread Andreas Hennings
Currently there is no (documented) way to directly create a \ReflectionType object. The class has no documented constructor. I propose that static factory methods shall be added for this purpose. This will be useful for code that wants to dynamically create and pass around reflection type

[PHP-DEV] Reflection API: Add ::getFullName() method.

2017-12-10 Thread Andreas Hennings
I propose a new method ::getFullName() for all methods that implement \Reflector. (I would add it to the \Reflector interface, but this would be a BC break.) The full name would be, depending on the type: function: "str_replace()", "Acme\foo()". class: "Acme\Animal\Cat", "stdClass". method:

[PHP-DEV] Reflection API: Add ->getTerminatedNamespace() method

2017-12-10 Thread Andreas Hennings
## Background / motivation Currently a number of reflection classes have a method ->getNamespaceName(). The namespace comes in a format that is not straightforward to work with. It requires the root namespace to be treated in a special way. $namespace = $relfClass->getNamespaceName();

Re: [PHP-DEV] Reflection API and Nullable Types

2016-10-11 Thread Sebastian Bergmann
On 10/11/2016 07:27 AM, Stanislav Malyshev wrote: I hope it's string(3) otherwise we have a bug on our hands That was a copy/pasta/no-adapt mistake, my bad. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Reflection API and Nullable Types

2016-10-10 Thread Stanislav Malyshev
Hi! > printed > > string(4) "?int" > string(3) "int" > > and now it prints > > string(4) "int" I hope it's string(3) otherwise we have a bug on our hands -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] Reflection API and Nullable Types

2016-10-09 Thread Niklas Keller
Sebastian Bergmann schrieb am So., 9. Okt. 2016, 08:56: > At some point in time during the development of PHP 7.1 this code > > function f(?int $x) > { > } > > $f = new ReflectionFunction('f'); > > var_dump((string) $f->getParameters()[0]->getType()); >

[PHP-DEV] Reflection API and Nullable Types

2016-10-09 Thread Sebastian Bergmann
At some point in time during the development of PHP 7.1 this code function f(?int $x) { } $f = new ReflectionFunction('f'); var_dump((string) $f->getParameters()[0]->getType()); var_dump($f->getParameters()[0]->getType()->getName()); printed string(4) "?int" string(3) "int"

Re: [PHP-DEV] Reflection-API (was: Re: [PHP-DEV] RFC: Return Types Update)

2014-10-23 Thread Levi Morrison
I have updated the section on Reflection to explain some of the design decisions: https://wiki.php.net/rfc/returntypehinting#reflection; hopefully that will help you and others to understand the rationale. Please let me know if you have follow-up questions. -- PHP Internals - PHP Runtime

Re: [PHP-DEV] Reflection-API (was: Re: [PHP-DEV] RFC: Return Types Update)

2014-10-20 Thread Chris Wright
Markus On 19 October 2014 20:31, Markus Fischer mar...@fischer.name wrote: On 16.10.14 06:39, Levi Morrison wrote: - The design and accompanying section of reflection[3] has been rewritten entirely. [3]: https://wiki.php.net/rfc/returntypehinting#reflection I've some comments about the

Re: [PHP-DEV] Reflection-API

2014-10-20 Thread Markus Fischer
Hi Chris, On 20.10.14 12:10, Chris Wright wrote: [...] in depth summary of future idea ReflectionType Thanks a lot for the clarification and regarding the future expansion of the use of ReflectionType I now better understand most points and why they're currently are that way. I don't think I've

[PHP-DEV] Reflection-API (was: Re: [PHP-DEV] RFC: Return Types Update)

2014-10-19 Thread Markus Fischer
On 16.10.14 06:39, Levi Morrison wrote: - The design and accompanying section of reflection[3] has been rewritten entirely. [3]: https://wiki.php.net/rfc/returntypehinting#reflection I've some comments about the Reflection API addition/changes: 1. Note that getReturnType will always

[PHP-DEV] Reflection API Injection Mechanism

2007-02-09 Thread Jim Wilson
Dear PHP Internals subscribers, I have two quick questions regarding PHP 5's Reflection API (I apologize if this isn't the right list to ask): 1) Is there a way to inject a method into a Class such that future instantiations of that Class will have the method? For example: Before

Re: [PHP-DEV] Reflection API Injection Mechanism

2007-02-09 Thread Johannes Schlüter
Hi Jim, you're searching for runkit ;-) http://de.php.net/manual/en/ref.runkit.php johannes On Fri, 2007-02-09 at 10:18 -0600, Jim Wilson wrote: Dear PHP Internals subscribers, I have two quick questions regarding PHP 5's Reflection API (I apologize if this isn't the right list to ask):

Re: [PHP-DEV] Reflection API b0rked in HEAD and PHP_5_2

2006-06-09 Thread Hannes Magnusson
Hi Sebastian On 6/8/06, Sebastian Bergmann [EMAIL PROTECTED] wrote: http://phpfi.com/122573 Looks like the arginfo patch broke it.., well, actually it uncovered a bug in ext/reflection. The messages are correct, ReflectionMethod::invokeArgs takes two arguments but

[PHP-DEV] Reflection API b0rked in HEAD and PHP_5_2

2006-06-08 Thread Sebastian Bergmann
http://phpfi.com/122573 -- Sebastian Bergmann http://www.sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Reflection API idea

2005-11-23 Thread Marcus Boerger
Hello Bob, have you looked at head output of Reflection lately? I guess that contains all you want, right? marcus Wednesday, November 23, 2005, 5:19:10 AM, you wrote: Here's an idea for the maintainer of the Reflection API, to be able to view the class a method is defined in (if not

RE: [PHP-DEV] Reflection API idea

2005-11-23 Thread Jared Williams
Hi, This has been do-able in PHP5 for somewhile, (wrote a reflection browser while ago to show such things) http://www.ren.dotgeek.org/classbrowser/?class=DOMCdataSection Jared Here's an idea for the maintainer of the Reflection API, to be able to view the class a method is defined

Re: [PHP-DEV] Reflection API idea

2005-11-23 Thread Marcus Boerger
Hello Jared, hey cool stuff! Any chance you could publish this or make it a PEAR class or put it into the newly created Reflection extension as example? best regards marcus Wednesday, November 23, 2005, 12:50:25 PM, you wrote: Hi, This has been do-able in PHP5 for somewhile, (wrote

RE: [PHP-DEV] Reflection API idea

2005-11-23 Thread Jared Williams
Hi, hey cool stuff! Any chance you could publish this or make it a PEAR class or put it into the newly created Reflection extension as example? http://sourceforge.net/projects/phpclassbrowser/ Its in CVS at sourceforge. (Still haven't gotten around to reading up on how to create file

[PHP-DEV] Reflection API idea

2005-11-22 Thread Bob Silva
Here's an idea for the maintainer of the Reflection API, to be able to view the class a method is defined in (if not overridden). class Vehicle { function go() {} function crash() {} } class Car extends Vehicle { function crash() {} function collectInsurance() {} } class Ford

RE: [PHP-DEV] Reflection API idea

2005-11-22 Thread Bob Silva
Whoops, that memcmp should be a strcmp. -Original Message- From: Bob Silva [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 22, 2005 8:19 PM To: 'internals' Subject: [PHP-DEV] Reflection API idea Here's an idea for the maintainer of the Reflection API, to be able to view

[PHP-DEV] Reflection API: Getting the default value of a property

2005-06-10 Thread Sebastian Bergmann
Am I just blind or do we not have a method in the Reflection API that retuns the default value of a class' property? -- Sebastian Bergmann http://www.sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 -- PHP Internals - PHP

[PHP-DEV] Reflection API r1.136

2004-11-02 Thread Timm Friebe
revision 1.136 date: 2004/10/31 15:30:53; author: helly; state: Exp; lines: +163 -1 - Add ReflectionFunction::invokeArgs(array) - Add ReflectionMethod::invokeArgs(obj, array) Why was this added? These: 1) call_user_func_array( array(new ReflectionMethod('class', 'method'), 'invoke',

Re: [PHP-DEV] Reflection API r1.136

2004-11-02 Thread Sebastian Bergmann
Timm Friebe wrote: Why was this added? I asked Marcus to add these. These: 1) call_user_func_array( array(new ReflectionMethod('class', 'method'), 'invoke', array(1, 2, 3) ) 2) call_user_func( array(new ReflectionMethod('class', 'method'), 'invoke', 1, 2, 3

Re: [PHP-DEV] Reflection API r1.136

2004-11-02 Thread Timm Friebe
On Tue, 2004-11-02 at 13:52, Sebastian Bergmann wrote: Timm Friebe wrote: Why was this added? I asked Marcus to add these. He forgot to support invokeArgs(NULL, array(...)) for static invocation (Warning: invokeArgs() expects parameter 1 to be object, null given). [...call_user_func*

Re: [PHP-DEV] Reflection API r1.136

2004-11-02 Thread Sebastian Bergmann
Timm Friebe wrote: Care to elaborate? Except for the call_user_func-syntax being longer I don't see any difference. The difference is that with using a method of ReflectionFunction or ReflectionMethod I do not have to switch paradigms (Reflection API and OOP vs. call_user_func*() and

Re: [PHP-DEV] Reflection API r1.136

2004-11-02 Thread Marcus Boerger
Hello Sebastian, hello Timm, after all the differnece is whether we know of the typical PHP user can find out. marcus p.s.: Timm you're going to FFM? Tuesday, November 2, 2004, 11:45:18 PM, you wrote: Timm Friebe wrote: Care to elaborate? Except for the call_user_func-syntax being longer

Re: [PHP-DEV] Reflection API Prototypes patch

2004-06-19 Thread Sebastian Bergmann
Timm Friebe wrote: Can somebody commit this? Done. -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

[PHP-DEV] Reflection API: studlyCaps v. underscores?

2004-04-03 Thread Jochem Maas
Firstly this is a question rather than an opinion (if anyone wants to know I prefer studlyCaps for aethetic reasons so I'm happy with the decision to use them!) Having read all the posts on studlyCaps on this list, and understanding that studlyCaps was the std. for all new OO APIs I found the

Re: [PHP-DEV] Reflection API: studlyCaps v. underscores?

2004-04-03 Thread Timm Friebe
On Sat, 2004-04-03 at 20:00, Jochem Maas wrote: [...] Having read all the posts on studlyCaps on this list, and understanding that studlyCaps was the std. for all new OO APIs I found the following a little odd: The documentation at

Re: [PHP-DEV] Reflection API: studlyCaps v. underscores?

2004-04-03 Thread Andi Gutmans
At 08:28 PM 4/3/2004 +0200, Timm Friebe wrote: On Sat, 2004-04-03 at 20:00, Jochem Maas wrote: [...] Having read all the posts on studlyCaps on this list, and understanding that studlyCaps was the std. for all new OO APIs I found the following a little odd: The documentation at

Re: [PHP-DEV] Reflection API: studlyCaps v. underscores?

2004-04-03 Thread Sean Coates
I am in contact with Timm re: integrating his doc into the official manual. S Andi Gutmans wrote: At 08:28 PM 4/3/2004 +0200, Timm Friebe wrote: Have you contacted the doc guys to make the add this to the PHP manual? Andi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

Re: [PHP-DEV] reflection API bug or change?

2003-12-23 Thread Timm Friebe
On Mon, 2003-12-22 at 16:05, Hans Lellelid wrote: Hi - We're using the Reflection API in a project for which I'm lead developer. Seems to be something changed between beta-2 and beta-3. We're now getting the following exception when calling getClass() on a class hint: [...] Works fine

Re: [PHP-DEV] reflection API bug or change?

2003-12-23 Thread Hans Lellelid
On Mon, 2003-12-22 at 16:05, Hans Lellelid wrote: Hi - We're using the Reflection API in a project for which I'm lead developer. Seems to be something changed between beta-2 and beta-3. We're now getting the following exception when calling getClass() on a class hint: [...] Works fine

[PHP-DEV] reflection API bug or change?

2003-12-22 Thread Hans Lellelid
Hi - We're using the Reflection API in a project for which I'm lead developer. Seems to be something changed between beta-2 and beta-3. We're now getting the following exception when calling getClass() on a class hint: exception 'reflection_exception' with message 'Class FileSet does not

[PHP-DEV] reflection api - camelcaps

2003-12-02 Thread George Schlossnagle
I'd like to convert the reflection API to the current php standard of CamelCaps (instead of underscores) for it's class and method names. Any objections? George -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] reflection api - camelcaps

2003-12-02 Thread Marcus Boerger
Hello George, Tuesday, December 2, 2003, 6:58:58 PM, you wrote: I'd like to convert the reflection API to the current php standard of CamelCaps (instead of underscores) for it's class and method names. Any objections? No objections. Strong agreement.' -- Best regards, Marcus

Re: [PHP-DEV] reflection api - camelcaps

2003-12-02 Thread Derick Rethans
On Tue, 2 Dec 2003, George Schlossnagle wrote: I'd like to convert the reflection API to the current php standard of CamelCaps (instead of underscores) for it's class and method names. Any objections? yes Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] reflection api - camelcaps

2003-12-02 Thread George Schlossnagle
On Dec 2, 2003, at 1:18 PM, Derick Rethans wrote: On Tue, 2 Dec 2003, George Schlossnagle wrote: I'd like to convert the reflection API to the current php standard of CamelCaps (instead of underscores) for it's class and method names. Any objections? yes Care to elaborate? George -- PHP

Re: [PHP-DEV] reflection api - camelcaps

2003-12-02 Thread Sebastian Bergmann
George Schlossnagle wrote: I'd like to convert the reflection API to the current php standard of CamelCaps (instead of underscores) for it's class and method names. Why deviate from PEAR CS in this? -- Sebastian Bergmann http://sebastian-bergmann.de/

Re: [PHP-DEV] reflection api - camelcaps

2003-12-02 Thread Adam Maccabee Trachtenberg
On Tue, 2 Dec 2003, George Schlossnagle wrote: On Dec 2, 2003, at 1:22 PM, Sebastian Bergmann wrote: George Schlossnagle wrote: I'd like to convert the reflection API to the current php standard of CamelCaps (instead of underscores) for it's class and method names. Why deviate from

Re: [PHP-DEV] reflection api - camelcaps

2003-12-02 Thread George Schlossnagle
On Dec 2, 2003, at 1:51 PM, Adam Maccabee Trachtenberg wrote: On Tue, 2 Dec 2003, George Schlossnagle wrote: On Dec 2, 2003, at 1:22 PM, Sebastian Bergmann wrote: George Schlossnagle wrote: I'd like to convert the reflection API to the current php standard of CamelCaps (instead of underscores)

Re: [PHP-DEV] reflection api - camelcaps

2003-12-02 Thread Derick Rethans
On Tue, 2 Dec 2003, George Schlossnagle wrote: On Dec 2, 2003, at 1:18 PM, Derick Rethans wrote: On Tue, 2 Dec 2003, George Schlossnagle wrote: I'd like to convert the reflection API to the current php standard of CamelCaps (instead of underscores) for it's class and method names.

Re: [PHP-DEV] reflection api - camelcaps

2003-12-02 Thread Christian Stocker
On 12/2/03 7:51 PM, Adam Maccabee Trachtenberg wrote: On Tue, 2 Dec 2003, George Schlossnagle wrote: On Dec 2, 2003, at 1:22 PM, Sebastian Bergmann wrote: George Schlossnagle wrote: I'd like to convert the reflection API to the current php standard of CamelCaps (instead of underscores) for

Re: [PHP-DEV] reflection api - camelcaps

2003-12-02 Thread Derick Rethans
On Tue, 2 Dec 2003, Christian Stocker wrote: This raises my question of my the new Exception class uses CamelCaps instead of underscores? For instance, its methods are: getMessage(), getCode(), etc. I don't think any other built-in method or packaged extension does this. ext/dom and

RE: [PHP-DEV] reflection api - camelcaps

2003-12-02 Thread Lukas Smith
From: Derick Rethans [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 8:02 PM On Tue, 2 Dec 2003, George Schlossnagle wrote: On Dec 2, 2003, at 1:18 PM, Derick Rethans wrote: On Tue, 2 Dec 2003, George Schlossnagle wrote: I'd like to convert the reflection API to

Re: [PHP-DEV] Reflection API

2003-07-03 Thread moshe doron
It's not an annoyance - it's not my spec, I'm just implementing it. I'm happy to change the code to work via properties instead, it's not a major change. I would like to settle on a concensus first. +1 (maybe both)? George -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] Reflection API

2003-07-03 Thread Andrei Zmievski
On Wed, 02 Jul 2003, Andi Gutmans wrote: I've already said so, but I definitely prefer methods. So do I. Overloading properties is a bit of magical powder that's appropriate only in some cases. -Andrei * There is no knowledge that is not power. -- Ralph Waldo Emerson * -- PHP Internals - PHP

Re: [PHP-DEV] Reflection API

2003-07-03 Thread Jon Parise
On Thu, Jul 03, 2003 at 03:36:58PM +0200, moshe doron wrote: It's not an annoyance - it's not my spec, I'm just implementing it. I'm happy to change the code to work via properties instead, it's not a major change. I would like to settle on a concensus first. +1 (maybe both)?

Re: [PHP-DEV] Reflection API

2003-07-03 Thread Andi Gutmans
At 06:40 PM 3/7/2003 -0400, Jon Parise wrote: On Thu, Jul 03, 2003 at 03:36:58PM +0200, moshe doron wrote: It's not an annoyance - it's not my spec, I'm just implementing it. I'm happy to change the code to work via properties instead, it's not a major change. I would like to settle on a

Re: [PHP-DEV] Reflection API

2003-07-03 Thread Alan Knowles
having had a quick think about this, here some thoughts that may affect it. What is the API going to be used for. a) replacement for method_exists(), call_user_func() in code .. which makes sense for the object methods... b) quick testing of what an interface is - as in print_r() is quicker than

Re: [PHP-DEV] Reflection API

2003-07-02 Thread Andi Gutmans
At 01:55 PM 1/7/2003 -0400, George Schlossnagle wrote: On Tuesday, July 1, 2003, at 12:56 PM, Sterling Hughes wrote: Not to throw a wrench in the wheel, but properties seem to be the more appropriate pattern. Especially when taking PHP's object overloading abilities into play. Accessors are a

Re: [PHP-DEV] Reflection API

2003-07-01 Thread Andrei Zmievski
On Tue, 01 Jul 2003, Alan Knowles wrote: It would be alot nicer if you could provide the majority of these as object variables (and/or) functions, it would enable print_r(new PHP_Function('counter')); which would save a lot of messing around, and writing code for general queries.. I posed

Re: [PHP-DEV] Reflection API

2003-07-01 Thread Sterling Hughes
Not to throw a wrench in the wheel, but properties seem to be the more appropriate pattern. Especially when taking PHP's object overloading abilities into play. Accessors are a Java paradigm that's as half-baked as it is repetitive, when you have overloading you no longer need property

Re: [PHP-DEV] Reflection API

2003-07-01 Thread George Schlossnagle
On Tuesday, July 1, 2003, at 12:56 PM, Sterling Hughes wrote: Not to throw a wrench in the wheel, but properties seem to be the more appropriate pattern. Especially when taking PHP's object overloading abilities into play. Accessors are a Java paradigm that's as half-baked as it is

Re: [PHP-DEV] Reflection API

2003-06-30 Thread Andi Gutmans
I must be thick. I don't quite understand how the source relates to what is described in the .png. Take for example the following from the api.c file: static zend_function_entry php_function_functions[] = { ZEND_FE(php_function, NULL) ZEND_FE(php_function_isinternal, NULL)

Re: [PHP-DEV] Reflection API

2003-06-30 Thread George Schlossnagle
On Monday, June 30, 2003, at 11:35 AM, George Schlossnagle wrote: A look in sqlite answered my question - I should be using ZEND_NAMED_FE. Will update patch momentarily. Updated now. -- George Schlossnagle -- Principal Consultant -- OmniTI Computer Consulting, Inc. -- +1.410.872.4910 x202 --

Re: [PHP-DEV] Reflection API

2003-06-30 Thread Andrei Zmievski
On Mon, 30 Jun 2003, George Schlossnagle wrote: On Monday, June 30, 2003, at 12:04 PM, Andi Gutmans wrote: I must be thick. I don't quite understand how the source relates to what is described in the .png. Take for example the following from the api.c file: I talked this over with

Re: [PHP-DEV] Reflection API

2003-06-30 Thread Andi Gutmans
At 11:44 AM 30/6/2003 -0400, George Schlossnagle wrote: On Monday, June 30, 2003, at 11:35 AM, George Schlossnagle wrote: A look in sqlite answered my question - I should be using ZEND_NAMED_FE. Will update patch momentarily. Updated now. I still get the old .diff via the URL you posted. Can

Re: [PHP-DEV] Reflection API

2003-06-30 Thread George Schlossnagle
On Monday, June 30, 2003, at 02:48 PM, Andi Gutmans wrote: At 11:44 AM 30/6/2003 -0400, George Schlossnagle wrote: On Monday, June 30, 2003, at 11:35 AM, George Schlossnagle wrote: A look in sqlite answered my question - I should be using ZEND_NAMED_FE. Will update patch momentarily. Updated

Re: [PHP-DEV] Reflection API

2003-06-30 Thread Andi Gutmans
At 02:01 PM 30/6/2003 -0400, George Schlossnagle wrote: On Monday, June 30, 2003, at 02:48 PM, Andi Gutmans wrote: At 11:44 AM 30/6/2003 -0400, George Schlossnagle wrote: On Monday, June 30, 2003, at 11:35 AM, George Schlossnagle wrote: A look in sqlite answered my question - I should be

Re: [PHP-DEV] Reflection API

2003-06-30 Thread Sebastian Bergmann
Andi Gutmans wrote: Reflection_Function +1 -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

Re: [PHP-DEV] Reflection API

2003-06-30 Thread George Schlossnagle
On Monday, June 30, 2003, at 03:10 PM, Andi Gutmans wrote: At 02:01 PM 30/6/2003 -0400, George Schlossnagle wrote: On Monday, June 30, 2003, at 02:48 PM, Andi Gutmans wrote: At 11:44 AM 30/6/2003 -0400, George Schlossnagle wrote: On Monday, June 30, 2003, at 11:35 AM, George Schlossnagle

Re: [PHP-DEV] Reflection API

2003-06-30 Thread Andrei Zmievski
On Mon, 30 Jun 2003, George Schlossnagle wrote: Oh. Should be fine now. Plus the naming change for the class. Why aren't you using PHP_METHOD() macro? -Andrei * Entropy isn't what it used to be. * -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] Reflection API

2003-06-30 Thread Alan Knowles
It would be alot nicer if you could provide the majority of these as object variables (and/or) functions, it would enable print_r(new PHP_Function('counter')); which would save a lot of messing around, and writing code for general queries.. Regards Alan $obj = new PHP_Function(counter); print

[PHP-DEV] Reflection API

2003-06-29 Thread George Schlossnagle
Here is a first implementation of the reflection api, for functions (class PHP_Function in you diagram) http://www.schlossnagle.org/~george/php/reflection.diff http://www.schlossnagle.org/~george/php/zend_reflection_api.c http://www.schlossnagle.org/~george/php/zend_reflection_api.h Comments?

Re: [PHP-DEV] Reflection API RFC

2003-03-31 Thread Andrei Zmievski
On Sun, 30 Mar 2003, Alan Knowles wrote: - If you stored token start/end then you would be able to do getSource for function/method/class.. etc.. (which can do a load file/tokenizer and return implode('',array_range(starttoken,endtoken) Keeping track of the tokens this way would require

Re: [PHP-DEV] Reflection API RFC

2003-03-30 Thread Andi Gutmans
At 03:37 PM 3/29/2003 -0500, Andrei Zmievski wrote: I have the first draft of PHP 5 reflection API ready. You can find it at: http://www.gravitonic.com/software/php/reflection.txt Comments and suggestions are appreciated. By the way, I might have missed it,but maybe we should have a way to

Re: [PHP-DEV] Reflection API RFC

2003-03-30 Thread Jon Parise
On Sat, Mar 29, 2003 at 03:37:30PM -0500, Andrei Zmievski wrote: I have the first draft of PHP 5 reflection API ready. You can find it at: http://www.gravitonic.com/software/php/reflection.txt Comments and suggestions are appreciated. It would be cool if there was a way to get the

Re: [PHP-DEV] Reflection API RFC

2003-03-30 Thread Andrei Zmievski
On Sun, 30 Mar 2003, Jon Parise wrote: It would be cool if there was a way to get the (defined) set of parameters for a function / method. I'm going to assume that, because it's not included in your proposal, it's not currently possible given the current model, though. Right. The engine

Re: [PHP-DEV] Reflection API RFC

2003-03-29 Thread Andrei Zmievski
On Sat, 29 Mar 2003, Marcus Börger wrote: http://www.gravitonic.com/software/php/reflection.txt Comments and suggestions are appreciated. What about doing it with some interfaces? Why? -Andrei http://www.gravitonic.com/ * Software never has bugs.

Re: [PHP-DEV] Reflection API RFC

2003-03-29 Thread Marcus Börger
At 22:09 29.03.2003, Andrei Zmievski wrote: On Sat, 29 Mar 2003, Marcus Börger wrote: http://www.gravitonic.com/software/php/reflection.txt Comments and suggestions are appreciated. What about doing it with some interfaces? or an abstract base class because most methods are the same

Re: [PHP-DEV] Reflection API RFC

2003-03-29 Thread Timm Friebe
On Sat, 2003-03-29 at 21:37, Andrei Zmievski wrote: I have the first draft of PHP 5 reflection API ready. You can find it at: http://www.gravitonic.com/software/php/reflection.txt Comments and suggestions are appreciated. * ClassType::getMethods([int flags]); I assume flags is a

Re: [PHP-DEV] Reflection API RFC

2003-03-29 Thread Andrei Zmievski
On Sat, 29 Mar 2003, Timm Friebe wrote: I have the first draft of PHP 5 reflection API ready. You can find it at: http://www.gravitonic.com/software/php/reflection.txt Comments and suggestions are appreciated. * ClassType::getMethods([int flags]); I assume flags is a bitfield