commandbox.system.util

Class Executor

lucee.Component
    extended by commandbox.system.util.Executor

Copyright Since 2014 CommandBox by Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com I execute cfm templates in isolation Do not make this a singleton or cache it unless you want to persist its state between executions. That is because the "variables" scope is retained between calls to the "run()" method.

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


    • access = public
    • returntype = any
    • inject = FileSystem
    true false
    any $shell


    • access = public
    • returntype = any
    • inject = shell
    true false
    any $wirebox


    • access = public
    • returntype = any
    • inject = wirebox
    true false
    Method Summary
    any eval(string statement, string directory)
         eval.
    any getCurrentVariables()
    any getInstance()
    any runCode(string code, [boolean script='true'], string directory, [struct vars='[runtime expression]'])
         Execute a snipped of code in the context of a directory.
    any runFile(any template, [struct vars='[runtime expression]'])
         Execute an existing file.
     
    Methods inherited from class lucee.Component
    None

    Property Detail

    $fileSystemUtil

    property any $fileSystemUtil

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

    $shell

    property any $shell

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

    $wirebox

    property any $wirebox

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

    Method Detail

    eval

    public any eval(string statement, string directory)

    eval

    Parameters:
    statement - A CFML statement to evaluate
    directory

    getCurrentVariables

    public any getCurrentVariables()


    getInstance

    public any getInstance()


    runCode

    public any runCode(string code, [boolean script='true'], string directory, [struct vars='[runtime expression]'])

    Execute a snipped of code in the context of a directory

    Parameters:
    code - CFML code to run
    script - is the CFML code script or tags
    directory - Absolute path to a directory context to run in
    vars - Struct of vars to set so the code can access them

    runFile

    public any runFile(any template, [struct vars='[runtime expression]'])

    Execute an existing file

    Parameters:
    template - Absolute path to a .cfm to execute
    vars - Struct of vars to set so the template can access them