You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I would like to know if it's possible to call a function which will return true or false to indicate if the callable $function is already patched or not?
I mean to know if Patchwork\replace() has already been called for it.
Another question on the same topic is: what will happen if Patchwork\replace is called twice for the same callable?
Thank you,
regards,
Tomolimo
The text was updated successfully, but these errors were encountered:
I will soon attempt to implement this functionality and comment on any obstacles that might surface. I suspect that they, if any, would be related to methods and polymorphism. Global functions, on the other hand, are the easy part.
As for the multiple patches for the same function, they would not displace each other but rather stack on top, where only the topmost one receives the call by default, but can then relay it to the lower ones through callOriginal (a misnomer in this case).
Hello,
I would like to know if it's possible to call a function which will return true or false to indicate if the callable $function is already patched or not?
I mean to know if Patchwork\replace() has already been called for it.
Another question on the same topic is: what will happen if Patchwork\replace is called twice for the same callable?
Thank you,
regards,
Tomolimo
The text was updated successfully, but these errors were encountered: