commandbox.system.util

Class PrintBuffer

lucee.Component
    extended by commandbox.system.util.Print
      extended by commandbox.system.util.PrintBuffer

Copyright Since 2014 CommandBox by Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com I am a helper object that wraps the print helper. Instead of returning text, I accumulate it in a variable that can be retrieved at the end.

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
  • author : Brad Wood, Luis Majano, Denny Valliant
  •  
    Property Summary
    type property default serializable required
    any job


    • access = public
    • returntype = any
    • inject = interactiveJob
    true false
    any objectID


    • access = public
    • returntype = any
    true false
    any result
          Result buffer.

    • access = public
    • returntype = any
    true false
    any shell


    • access = public
    • returntype = any
    • inject = shell
    true false
    Constructor Summary
    init()
    Method Summary
    any clear()
    any columns(array items, [any formatUDF='[runtime expression]'])
    string getJob()
    string getObjectID()
    any getResult()
    string getShell()
    any onMissingMethod([any missingMethodName], [any missingMethodArguments])
    any setJob(any job)
    any setObjectID(any objectID)
    any setResult(any result)
    any setShell(any shell)
    any table(any data='[runtime expression]', [any includedHeaders=''], [any headerNames=''], [boolean debug='false'])
         Outputs a table to the screen.
    any toConsole()
    any tree(struct data, [any formatUDF='[runtime expression]'])
     
    Methods inherited from class commandbox.system.util.Print
    _onMissingMethod, _tree, get256Color, getANSIAttribute, indent, padRight, unansi
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()


    Property Detail

    job

    property any job

    Attributes:
    access - public
    required - false
    returntype - any
    inject - interactiveJob
    serializable - true

    objectID

    property any objectID

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    result

    property any result

    Result buffer

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    shell

    property any shell

    Attributes:
    access - public
    required - false
    returntype - any
    inject - shell
    serializable - true

    Method Detail

    clear

    public any clear()


    columns

    public any columns(array items, [any formatUDF='[runtime expression]'])

    Overrides:
    columns in class Print
    Parameters:
    items
    formatUDF

    getJob

    public string getJob()


    getObjectID

    public string getObjectID()


    getResult

    public any getResult()


    getShell

    public string getShell()


    onMissingMethod

    public any onMissingMethod([any missingMethodName], [any missingMethodArguments])

    Overrides:
    onMissingMethod in class Print
    Parameters:
    missingMethodName
    missingMethodArguments

    setJob

    public any setJob(any job)

    Parameters:
    job

    setObjectID

    public any setObjectID(any objectID)

    Parameters:
    objectID

    setResult

    public any setResult(any result)

    Parameters:
    result

    setShell

    public any setShell(any shell)

    Parameters:
    shell

    table

    public any table(any data='[runtime expression]', [any includedHeaders=''], [any headerNames=''], [boolean debug='false'])

    Outputs a table to the screen an array in the correct order matching the number of headers or a struct with keys matching the headers.

    Overrides:
    table in class Print
    Parameters:
    data - An array of data for the table. Each item in the array may either be
    includedHeaders
    headerNames
    debug

    toConsole

    public any toConsole()


    tree

    public any tree(struct data, [any formatUDF='[runtime expression]'])

    Overrides:
    tree in class Print
    Parameters:
    data - top level struct
    formatUDF