Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridge::callback() problem #2

Open
mendelgusmao opened this issue Apr 12, 2011 · 1 comment
Open

Bridge::callback() problem #2

mendelgusmao opened this issue Apr 12, 2011 · 1 comment

Comments

@mendelgusmao
Copy link
Owner

For now, callback cannot execute methods from classes, just functions.

call_user_func(array($class, $method)) doesn't work on PHP4. And even if I find a way to call, it will not be useful in some cases, as it demands to instantiate a new class or execute the method statically. For instance, if the callee class make a Ghetto-RPC call, probably the the same class will do some use of the returned data.

Then, what is needed:

  • Implementation of execution of class methods in callback()
  • Reference of the callee in callback()
  • Optional automatic execution of the callbacks based on the reference of the callee class and method
@mendelgusmao
Copy link
Owner Author

Standardize callbacks by eliminating informal arrays and replacing them by Call and CallsQueue in frontend.

It will be more verbose.
It will allow multiple callbacks.
It will not allow static calls (remember: frontend will be usually PHP 4).
For now, it will not even allow calls to object methods, as the returned data (from backend) won't store any reference to objects instantiated in frontend that don't belong or get exchanged with Ghetto RPC.

Maybe correlating a callback with a specific object, using a hash? Ghetto RPC is supposed to provide a Factory for objects in the backend. Doing that in frontend is something I'd like not to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant