Module PHP - stoicflame/enunciate GitHub Wiki
The PHP module generates PHP data types that can be used (de)serialize the REST resources as they are represented in XML or JSON.
The PHP module is configured with the php element under the modules element of the enunciate configuration file. It supports the following attributes:
| attribute | description |
|---|---|
label |
The "label" attribute is the label for the PHP API. This is the name by which the file will be identified (producing [label].php). By default the label is the same as the Enunciate project label. |
forceEnable |
The "forceEnable" attribute is used to force-enable the PHP module. By default, the PHP module is enabled only if a REST API is provided. |
singleFilePerClass |
The "singleFilePerClass" attribute is used to direct Enunciate to generate a single file for each model class. Default: false. |
The php element supports the following child elements:
The package-conversions subelement of the php element is used to map packages from the original API packages to PHP modules. This element supports an arbitrary number of convert child elements that are used to specify the conversions. These convert elements support the following attributes:
- The
fromattribute specifies the package that is to be converted. This package will match all classes in the package as well as any subpackages of the package. This means that if "org.enunciate" were specified, it would match "org.enunciate", "org.enunciate.api", and "org.enunciate.api.impl". - The
toattribute specifies what the package is to be converted to. Only the part of the package that matches thefromattribute will be converted.
Facet configuration for the module. See Facets.