[wsf-c-dev][PHP]Wsdl Generation - schema types
Buddhika Semasinghe
buddhika at wso2.com
Wed Dec 13 23:24:30 PST 2006
Samisa Abeysinghe wrote:
>>
>>
> IMHO, the second alternative of inventing a syntax that binds PHP to
> schema types would be more user friendly, in that the mapping is
> documented in one place unlike in alternative one.
> Even in option two, I reckon that we would need toXML method to get to
> know how to serialize/de-serialize the type.
> For all those trivial XSD types, such as int, string etc. we can
> provide a pre-defined type binding; so specifying the PHP type
> optional in the comment and even it is present, it could not be
> overridden. For all those non-trivial types, base64Binary etc, we
> could mandate the specification of a PHP type mapping in the doc
> comment and if it is missing, we can assume it to be 'mixed' meaning
> it can be anything.
>
>
In order to type mapping has to occur in php comment, the comment
procedure should be changed. So now it is used as
/*
* @param PT V
* @return PT
*/
where PT - PHP Type & V- value
Therefore when we are going to map php types to XSD types , Is it better
to use
/**
* @param XT PT V
*
*/
where XT is XSD Type. And there is an alternative way
/**
* @param PT V XT
*
*/
The latter seems better since it is according to the php doc comments style.
--Buddhika
More information about the Wsf-c-dev
mailing list