Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Adam Trachtenberg's Blog:
PHP 5 SOAP Hacking
Oct 22, 2005 @ 11:22:54

Adam Trachtenberg has posted a fun new usefulness for a feature in the PHP5 SOAP libraries - the classmap option.

My new favorite PHP 5 SOAP feature is the classmap option. By default, ext/soap converts complexTypes into stdClass objects. However, that’s only useful for reading the data.

Using the classmap option, you can specify how ext/soap should map complexTypes to PHP classes. This allows me to write methods to implement iterators and pretty-printing of objects.

He's looking to create a series of model classes that can automatically pull/push the data it needs. Now, if we could only see some code...



Trending Topics: