// No initial strategydocbox=newdocbox.DocBox();// With strategy aliasdocbox=newdocbox.DocBox( strategy: "HTML",properties: {outputDir:"/docs",projectTitle:"My API"} );// With strategy instancedocbox=newdocbox.DocBox(strategy: newdocbox.strategy.api.HTMLAPIStrategy(outputDir: "/docs",projectTitle: "My API" ));
addStrategy()
Adds a documentation generation strategy to the collection.
Parameters:
strategy - Strategy alias ("HTML", "JSON", "XMI", "CommandBox") or instance
properties - Strategy configuration properties (if using alias)
Returns: DocBox instance (for chaining)
Examples:
setStrategy()
Deprecated: Use addStrategy() instead. Kept for backward compatibility.
generate()
Generates documentation for the specified source code.
Parameters:
source - Source directory path(s). Can be:
String: Single directory path
Array: Multiple source definitions
mapping - Base mapping for the source code
excludes - Regex pattern to exclude files/folders (applied to relative paths)
throwOnError - Whether to throw exceptions for invalid components
Returns: DocBox instance
Examples:
getStrategies()
Returns the array of registered strategies.
Returns: Array
🎨 AbstractTemplateStrategy.cfc
Base class for all documentation strategies. Provides common functionality for HTML, JSON, XMI, and custom strategies.
Properties
run()
Executes the documentation generation strategy. Must be implemented by child classes.