Any objections to modifying zend_lookup_class() to support fully
qualified class names? Meaning, if it's passed 'A::B' it will lookup
class B in namespace A? This change would take a care of several places
in the code where class name can be passed.
-Andrei http://www.gravitonic.com/
"Everything has its wonders, even darkness and silence, and I learn,
whatever state I may be in, therein to be content." - Helen Keller
+1, because your patch is likely to fix the issue #21094.
Moriyoshi
Andrei Zmievski andrei@gravitonic.com wrote:
Any objections to modifying zend_lookup_class() to support fully
qualified class names? Meaning, if it's passed 'A::B' it will lookup
class B in namespace A? This change would take a care of several places
in the code where class name can be passed.-Andrei http://www.gravitonic.com/
"Everything has its wonders, even darkness and silence, and I learn,
whatever state I may be in, therein to be content." - Helen Keller
I'm not sure if it's a good idea to change it or if we'd want a new
function because zend_lookup_class() is used in the core executor and this
would just slow it down. Can you give me an example of where you'd want
this to work?
Andi
At 11:20 AM 4/4/2003 -0500, Andrei Zmievski wrote:
Any objections to modifying zend_lookup_class() to support fully
qualified class names? Meaning, if it's passed 'A::B' it will lookup
class B in namespace A? This change would take a care of several places
in the code where class name can be passed.-Andrei http://www.gravitonic.com/
"Everything has its wonders, even darkness and silence, and I learn,
whatever state I may be in, therein to be content." - Helen Keller
I'm not sure if it's a good idea to change it or if we'd want a new
function because zend_lookup_class() is used in the core executor and this
would just slow it down. Can you give me an example of where you'd want
this to work?
zend_builtin_functions.c:
575: if (zend_lookup_class(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &pce TSRMLS_CC) == SUCCESS) {
673: if (zend_lookup_class(lcname, Z_STRLEN_PP(class_name), &pce TSRMLS_CC) == FAILURE) {
740: if (zend_lookup_class(Z_STRVAL_PP(class), Z_STRLEN_PP(class), &pce TSRMLS_CC) == SUCCESS) {
Basically, any functions that take the name of a class and need to
obtain the corresponding class entry, should also be able to take the
namespace::class syntax. zend_lookup_class() seems like the best place
to accomplish it. Any other suggestions?
-Andrei http://www.gravitonic.com/
- Gun manufacturers don't make bad products, bad parents do. *
AZ>> Any objections to modifying zend_lookup_class() to support fully
AZ>> qualified class names? Meaning, if it's passed 'A::B' it will lookup
AZ>> class B in namespace A? This change would take a care of several
AZ>> places in the code where class name can be passed.
Could you point out which places are these?
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.109
AZ>> Any objections to modifying zend_lookup_class() to support fully
AZ>> qualified class names? Meaning, if it's passed 'A::B' it will lookup
AZ>> class B in namespace A? This change would take a care of several
AZ>> places in the code where class name can be passed.Could you point out which places are these?
See my reply to Andi.
-Andrei http://www.gravitonic.com/
- Change is the only constant. *