[OpenID] [oauth] Fwd: [diso-project] PHP XRDS-Simple Library

Joseph Smarr jsmarr at gmail.com
Sun Dec 28 05:41:54 UTC 2008


If it's useful, I've also written an XRDS-Simple parser in PHP that I use in
my Portable Contacts test harness to do OAuth Discovery and Portable
Contacts Discovery:
http://code.google.com/p/xrds-simple/source/browse/code/php/XrdsSimpleParser.php
--
it's just focused on fetching/parsing/navigating XRDS-Simple docs, but as
such it does a bit more to help you than just unmarshalling the XML. Thanks,
js

On Sat, Dec 27, 2008 at 7:19 AM, André Luís <andr3.pt at gmail.com> wrote:

> On Sat, Dec 27, 2008 at 12:27 AM,  <chris.messina at gmail.com> wrote:
> >
> > Figured folks on these lists would be able to provide some feedback on
> > Will's initial go at an XRDS-Simple library in PHP:
>
> Thanks for sharing this, Chris.
>
> >
> > ---------- Forwarded message ----------
> > From: Will Norris <will at willnorris.com>
> > Date: Fri, 26 Dec 2008 13:57:23 -0800
> > Subject: [diso-project] PHP XRDS-Simple Library
> > To: diso-project at googlegroups.com
> >
>
>
>
> > Right now I'm using the PHP DOM library for the
> > marshalling, which is only available in PHP5.  If we want to support
> > PHP4, we'll need to write marshallers that use the DOM XML library.
> > If the code is cleanly abstracted, this won't actually be very
> > difficult.
>
> +1 for going at it from a php5 point of view. php4 is on its way out
> and even though some legacy sites still use it, it shouldn't be too
> hard for them to hack a solution for your xml parsing... imho, it
> shouldn't be in the scope of this library to provide php4 support. at
> most, create a driver that uses php5 but can later be rewritten for
> php4.
>
> >
> > Right now I'd love to hear any feedback on this.  There are a couple
> > of phpUnit tests to see how the pieces fit together.  Does this seem
> > like a logical approach to this problem?  Am I overlooking anything
> > really big?
>
> Seems like a good approach to me... at least, as good as any.
>
> Looking at the code (in a bit of a rush), it seems like you're not
> doing any error handling. Is that on purpose? Should we try {} catch
> stuff ourselves when using the lib (xml malformed and such)?
>
> Thanks for doing this Will. It will definitely make it easier for
> anyone who wants to mess with xrds.
>
> Cheers!
>
> --
> André Luís
> http://andr3.net/
> _______________________________________________
> general mailing list
> general at openid.net
> http://openid.net/mailman/listinfo/general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openid.net/pipermail/openid-general/attachments/20081227/5a0cf6c6/attachment-0001.htm>


More information about the general mailing list