Class PHPXMLClientModule
java.lang.Object
com.webcohesion.enunciate.module.BasicEnunicateModule
com.webcohesion.enunciate.module.BasicGeneratingModule
com.webcohesion.enunciate.modules.php_xml_client.PHPXMLClientModule
- All Implemented Interfaces:
ApiFeatureProviderModule,DependingModuleAwareModule,EnunciateModule
- Author:
- Ryan Heaton
-
Field Summary
Fields inherited from class com.webcohesion.enunciate.module.BasicEnunicateModule
config, context, dependingModules, enunciate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcall(EnunciateContext context) Finds an example resource method, according to the following preference order: The first method annotated withDocumentationExample.protected StringThe name of the bundle file.getName()protected FileThe package-to-namespace conversions.getSlug()The label for the PHP API.protected Fileprotected StringThe name of the generated PHP source file.protected URLgetTemplateURL(String template) Get a template URL for the template of the given name.booleanWhether there should be a single file per class.protected StringpackageToNamespace(String pckg) processTemplate(URL templateURL, Object model) Processes the specified template with the given model.protected StringreadResource(String resource, Map<String, Object> model) Reads a resource into string form.protected booleanMethods inherited from class com.webcohesion.enunciate.module.BasicGeneratingModule
buildFileList, findSourceTimestamp, getManifest, getOldest, getYoungest, isUpToDate, isUpToDateWithSourcesMethods inherited from class com.webcohesion.enunciate.module.BasicEnunicateModule
acknowledgeDependingModules, debug, descriptionOf, error, info, init, init, isEnabled, isEnabledByDefault, positionOf, resolveFile, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.webcohesion.enunciate.module.EnunciateModule
init, init, isEnabled
-
Constructor Details
-
PHPXMLClientModule
public PHPXMLClientModule()
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceEnunciateModule- Returns:
- "php-xml-client"
-
getDependencySpecifications
- Specified by:
getDependencySpecificationsin interfaceEnunciateModule- Overrides:
getDependencySpecificationsin classBasicEnunicateModule
-
call
- Specified by:
callin interfaceEnunciateModule
-
usesUnmappableElements
protected boolean usesUnmappableElements() -
getSourceDir
-
getPackageDir
-
processTemplate
public String processTemplate(URL templateURL, Object model) throws IOException, freemarker.template.TemplateException Processes the specified template with the given model.- Parameters:
templateURL- The template URL.model- The root model.- Throws:
IOExceptionfreemarker.template.TemplateException
-
packageToNamespace
-
getBundleFileName
The name of the bundle file.- Returns:
- The name of the bundle file.
-
readResource
Reads a resource into string form.- Parameters:
resource- The resource to read.- Returns:
- The string form of the resource.
-
findExampleResourceMethod
Finds an example resource method, according to the following preference order:- The first method annotated with
DocumentationExample. - The first method with BOTH an output payload with a known XML element and an input payload with a known XML element.
- The first method with an output payload with a known XML element.
- Returns:
- An example resource method, or if no good examples were found.
- The first method annotated with
-
getSourceFileName
The name of the generated PHP source file.- Returns:
- The name of the generated PHP source file.
-
getTemplateURL
Get a template URL for the template of the given name.- Parameters:
template- The specified template.- Returns:
- The URL to the specified template.
-
getSlug
The label for the PHP API.- Returns:
- The label for the PHP API.
-
getPackageToNamespaceConversions
The package-to-namespace conversions.- Returns:
- The package-to-namespace conversions.
-
getFacetIncludes
-
getFacetExcludes
-
isSingleFilePerClass
public boolean isSingleFilePerClass()Whether there should be a single file per class. Default: false (all classes are contained in a single file).- Returns:
- Whether there should be a single file per class.
-