generate PHP classes from XSD?

后端 未结 8 2138
春和景丽
春和景丽 2020-12-05 07:41

Is there in the world analogues of JavaBeans or JAXB for PHP? Is it possible to generate PHP classes from XML schema?

It\'s common practice to publish API\'s as XSD

8条回答
  •  执念已碎
    2020-12-05 07:51

    This seems to do a decent job https://github.com/goetas-webservices/xsd2php

    I wish it handled enumeration validation, but seemed to work ok in my use case. I found the META .yml files it generates helpful.

提交回复
热议问题