If this could be overcame I think it would be relatively easy to
consolidate this code internally. I will look at it this evening and
tomorrow.
New patches attached.
I have fixed the forward_static_call (I am not attached to the name and am
open to suggestions) patch to use a callable. in doing this I also added an
additional check to make sure the called_class is only forwarded if the
class whose method being called is an ancestor of the current class. If that
is not the case, then the behaviour will actually be identical to
call_user_func*.
I created against patch for both 5_3 and 6.
I have also updated and attached that parent forwarding patch for both 5_3
and 6. In the event that someone wants to look at that.
- Mike Lively
If this could be overcame I think it would be relatively easy to
consolidate this code internally. I will look at it this evening and
tomorrow.
New patches can be found at
http://www.digitalsandwich.com/Patches/index.html
I have fixed the forward_static_call (I am not attached to the name and am
open to suggestions) patch to use a callable. In doing this I also added an
additional check to make sure the called_class is only forwarded if the
class whose method being called is an ancestor of the current class. If that
is not the case, then the behaviour will actually be identical to
call_user_func*.
I created against patch for both 5_3 and 6.
I have also updated and attached that parent:: forwarding patch for both 5_3
and 6. In the event that someone wants to look at that (PLEASE??? ;)).
- Mike Lively
New patches can be found at
http://www.digitalsandwich.com/Patches/index.htmlI have fixed the forward_static_call (I am not attached to the name and am
open to suggestions) patch to use a callable. In doing this I also added an
additional check to make sure the called_class is only forwarded if the
class whose method being called is an ancestor of the current class. If that
is not the case, then the behaviour will actually be identical to
call_user_func*.I created against patch for both 5_3 and 6.
I have also updated and attached that parent:: forwarding patch for both
5_3 and 6. In the event that someone wants to look at that (PLEASE??? ;)).
- Mike Lively
Has anyone had a chance to look at this? I don't want to forget about it
again or before I know it 5.3 RCs will be out and I will have missed the
boat...again...
Hello,
the forward_static_call looks like a decent non-intrusive solution,
and your patch looks
good from what I can tell! I guess you should commit it so it can be
documented and all.
regards
New patches can be found at
http://www.digitalsandwich.com/Patches/index.htmlI have fixed the forward_static_call (I am not attached to the name and am
open to suggestions) patch to use a callable. In doing this I also added an
additional check to make sure the called_class is only forwarded if the
class whose method being called is an ancestor of the current class. If that
is not the case, then the behaviour will actually be identical to
call_user_func*.I created against patch for both 5_3 and 6.
I have also updated and attached that parent:: forwarding patch for both
5_3 and 6. In the event that someone wants to look at that (PLEASE??? ;)).
- Mike Lively
Has anyone had a chance to look at this? I don't want to forget about it
again or before I know it 5.3 RCs will be out and I will have missed the
boat...again...
--
Etienne Kneuss
http://www.colder.ch
Men never do evil so completely and cheerfully as
when they do it from a religious conviction.
-- Pascal
Hello,
the forward_static_call looks like a decent non-intrusive solution,
and your patch looks
good from what I can tell! I guess you should commit it so it can be
documented and all.
If by 'you' you mean me...I can't. I don't have any cvs karma, or an account
for that matter. I am going to go ahead and write the tests and add them to
a new copy of the patch. Then it will be ready for someone to commit.
To answer Stanislav's question yes, the forward_static_call patch will
suffice my concerns with the current implementation. You did mention that
you weren't a big fan of the name, I am not particularly attached to it
either. If you (or anyone else) has better name in mind I would be happy to
change it.
To answer Stanislav's question yes, the forward_static_call patch will
suffice my concerns with the current implementation. You did mention that
you weren't a big fan of the name, I am not particularly attached to it
either. If you (or anyone else) has better name in mind I would be happy to
change it.
Great. Could you just add a couple of tests - to both verify it works
and illustrate the idea? Then I guess it'll be ready to commit.
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
Could I just get a confirmation that the parent forwarding patch has
been looked at? It seems to me that the patch makes parent:: work as
one would expect when extending static methods, and would not cause
any backwards compatibility problems. Why is add a function preferred?
Thanks,
Joseph North
To answer Stanislav's question yes, the forward_static_call patch will
suffice my concerns with the current implementation. You did mention that
you weren't a big fan of the name, I am not particularly attached to it
either. If you (or anyone else) has better name in mind I would be happy to
change it.Great. Could you just add a couple of tests - to both verify it works
and illustrate the idea? Then I guess it'll be ready to commit.--
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
New patches can be found at
http://www.digitalsandwich.com/Patches/index.htmlI have fixed the forward_static_call (I am not attached to the name and
am open to suggestions) patch to use a callable. In doing this I also
Looks fine. Would this function solve the problem without additional
patches?
In any case, I do not see why we can't have such function if it's
needed. Only thing is there should be some tests added for it (and
eventually the docs too ;)
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com