Super PHP .NET (SPN)
More functionality is on the way. I'll make releases when extra parts pass testing.
SPN is a layer which rests between certain .NET functionality and PHP. Specifically, it is a class to handle SOAP calls between PHP and .NET and manipulating the data coming from .NET.
At its core, SPN is a SOAP class that can perform complex PHP operations on .NET datatables. In your web services, simply return the entire datatable in your function and SPN will transform the datatable into an array of objects (you can specify an object or it will simply create the default stdClass for you. While the .NET functionality is the focus of this class (and the expanded features that will be released at a later date), you can certainly ignore the .NET capabilities and use this class as a very capable PHP SOAP client.
SPN functionality includes the following:
version 1.0.0 alphaCreated by Jarrod Nettles - INCCRRA October 2009 firstname.lastname@example.org
- Datatable converter (from either a file or a source string)
- Plugin architecture to support quick transformation of values
- SOAP layer (can interface with datatable converter)
- Parameter Builder which converts strings of parameters into arrays
Contributions also made by Matt Peitz and Mike Cellini, and thanks to Don Whitehead who first suggested the idea of making this project open source.
This is the alpha release of SPN and is still very much in testing. Datatables are by their very nature finicky objects so if you
come across any bugs please report them to the SourceForge homepage with as much detail as you can provide. If you would like to make contributions
to this project, email me at email@example.com with any suggestions/fixes/code that you would be willing to provide. As things stand the
following areas could use work/expansion:
VERSION 2 Coming Soon!
Version 2 of SPN is going to be a pretty radical rewrite from the first version, with a lot more emphasis placed upon intercommunication between PHP and .NET than before. In version 1 SPN is just a PHP SOAP wrapper that can parse datatables into an array of objects. The feature list is really starting to expand with version 2.
For starters, I've removed allowing a single instantiation of SPN to make different SOAP calls by storing a list of the WSDLs in an array. This was really just confusing people, I think, so from v2.0 each instantiation is targeted at one
WSDL. I've also implemented method chaining and reworked the structure of the class to be a bit more friendly to modify.
A good part of my work this time around has actually been in .NET. For those of you who write your own web services you will truly appreciate the .NET module pack that SPN2 will be shipping with. Just as a taste, it has a datatable converter which reduces your datatable to a pure, schemaless XML representation (making it INSANELY easy to parse out a datatable structure in PHP). The next is file transfer - this came out of needing to send PDFs over SOAP without creating temporary files on the server - basically it reduces your files to a byte code array which are then reassembled in PHP; all of which is made super-easy by SPN2.
And lastly - the most requested feature from SPN1 - the ability to pass datatables back
to .NET from PHP. This is still being ironed out but you'll be able to pass an array into the soapCall parameters and have it hammered into a datatable back in .NET. Its truly, truly beautiful (there's also an overloads that lets you pass a single object into a Dictionary).
All of this is forthcoming, albeit very soon! There's a few more features I'd like to implement first - my eventual goal with all of this is for there to be complete transparency between any serializable object or type that either PHP or .NET can offer.