Welcome Guest, Not a member yet? Register   Sign In
using my library method in XML-RPC

Bug 4300 wasn't listed in the 1.6.2 changelog so I just assumed it wasn't fixed. I'll try it out this week.


Let me see if I understand. It is not possible, even with this fix, to have a single controller call methods from more than one separate library.

For instance I can't have a single interface/controller xmlrpc(.php) call My_blog.new_post, My_pictures.get_recent, My_dog.ate_my_homework...

Is this correct? I'll need separate API endpoints (controllers) for each library or one omnipotent controller including all methods.

[eluser]Derek Jones[/eluser]
Not necessarily, linuxamp. The XMLRPC request is only going to call one method, so you can conditionally set and instantiate $config['object'] to whichever class is appropriate for the call.

Derek, thanks for the support.

I understand that I can instantiate the $config[’object’] based on the RPC method being called but how do I know which method is being called? The controller maps all RPC methods to PHP methods using the $config['functions'] array but as far as I can tell the controller has no idea which RPC method was called. Is there some property I can use as the conditional determinant (RPC method name)? I can't seem to find it.

[eluser]Derek Jones[/eluser]
No, my apologies, you're right that there's not a good way to get that information mid-execution.

Okay, thanks. Does this mean I get bumped from Grad Student -> Lab Assistant? Or do I have to create the patch to earn that promotion Smile

[eluser]Derek Jones[/eluser]
You just need to correct me 61 more times, if memory serves!

Theme © iAndrew 2016 - Forum software by © MyBB