The main thing holding back a php4 backport is the use of Exceptions.. Currently the php-library (as well as the oauth-php library iirc) uses Exceptions when somethings goes wrong, or a parameter is missing or similar..
So you would need to rewrite all functions throwing exceptions to returning false or null instead. You would then have to work through all functions calling these functions and add a check to see if the returned value != false/null, and in that case return false/null itself. You would then have to work though all the functions calling _those_ functions etc etc. You might try and experiment with using trigger_error on a sufficiently high error-level that it aborts execution, but low enough for you to catch it with set_error_handler.. (And then you would have to rename all the __construct functions into the name of their respective classes - but this is easily done) Regards Morten On Mar 5, 2009, at 4:35 PM, Zhihong wrote: > > Does anyone have an OAuth library that works in PHP4? > > We have a client who is entrenched in PHP4. They already use OpenSSL > so all the crypto functions are there. I don't think it would be hard > to port current OAuth library to PHP4, is it? > > Thanks! > > Zhihong > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "OAuth" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/oauth?hl=en -~----------~----~----~----~------~----~------~--~---
