testbox.apidocs.docbox

Class DocBox

lucee.Component
    extended by testbox.apidocs.docbox.DocBox

Core DocBox documentation class
Copyright 2015 Ortus Solutions, Corp www.ortussolutions.com

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any<docbox.strategy.AbstractTemplateStrategy> strategy
          The strategy to use for document generation.

    • access = public
    • returntype = any
    • doc_generic = docbox.strategy.AbstractTemplateStrategy
    true false
    Constructor Summary
    init([any strategy='docbox.strategy.api.HTMLAPIStrategy'], [struct properties='[runtime expression]'])
          Constructor.
    Method Summary
    query buildMetaDataCollection(array inputSource, [string excludes=''])
         Builds the searchable meta data collection.
    private any cleanPath(any path, any inputDir)
         Clean input path.
    DocBox generate(any source, [string mapping=''], [string excludes=''])
         Generate the docs.
    private array getImplements(struct metadata)
         Gets an array of the classes that this metadata implements, in order of extension.
    private array getInheritance(struct metadata)
         Gets an array of the classes that this metadata extends, in order of extension.
    string getStrategy()
    any setStrategy(any strategy)
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init([any strategy='docbox.strategy.api.HTMLAPIStrategy'], [struct properties='[runtime expression]'])

    Constructor we create the default strategy of 'docbox.strategy.api.HTMLAPIStrategy'

    Parameters:
    strategy - The optional strategy to generate the documentation with. This can be a class path or an instance of the strategy. If none is passed then
    properties - The struct of properties to instantiate the strategy with.

    Property Detail

    strategy

    property any<docbox.strategy.AbstractTemplateStrategy> strategy

    The strategy to use for document generation. Must extend docbox.strategy.AbstractTemplateStrategy

    Attributes:
    access - public
    required - false
    returntype - any
    doc_generic - docbox.strategy.AbstractTemplateStrategy
    serializable - true

    Method Detail

    buildMetaDataCollection

    public query buildMetaDataCollection(array inputSource, [string excludes=''])

    Builds the searchable meta data collection

    Parameters:
    inputSource - an array of structs containing inputDir and mapping
    excludes - A regex that will be applied to the input source to exclude from the docs

    cleanPath

    private any cleanPath(any path, any inputDir)

    Clean input path

    Parameters:
    path - The incoming path to clean
    inputDir - The input dir to clean off

    generate

    public DocBox generate(any source, [string mapping=''], [string excludes=''])

    Generate the docs

    Parameters:
    source - Either, the string directory source, OR an array of structs containing 'dir' and 'mapping' key
    mapping - The base mapping for the folder. Only required if the source is a string
    excludes - A regex that will be applied to the input source to exclude from the docs

    getImplements

    private array getImplements(struct metadata)

    Gets an array of the classes that this metadata implements, in order of extension

    Parameters:
    metadata - The metadata to look at

    getInheritance

    private array getInheritance(struct metadata)

    Gets an array of the classes that this metadata extends, in order of extension

    Parameters:
    metadata - The metadata to look at

    getStrategy

    public string getStrategy()


    setStrategy

    public any setStrategy(any strategy)

    Parameters:
    strategy