lucee.Component
commandbox.system.util.CFMLExecutor
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.
| Property Summary | ||||
|---|---|---|---|---|
| type | property | default | serializable | required |
any
|
$fileSystemUtil
|
true
|
false
|
|
any
|
$shell
|
true
|
false
|
|
any
|
$wirebox
|
true
|
false
|
|
| Method Summary | |
|---|---|
boolean
|
assert([any target], [any message=''])
This method mimics a Java/Groovy assert() function, where it evaluates the target to a boolean value or an executable closure and it must be true. |
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 snippet 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 |
|---|
access - publicrequired - falsereturntype - anyinject - FileSystemserializable - trueaccess - publicrequired - falsereturntype - anyinject - shellserializable - trueaccess - publicrequired - falsereturntype - anyinject - wireboxserializable - true| Method Detail |
|---|
This method mimics a Java/Groovy assert() function, where it evaluates the target to a boolean value or an executable closure and it must be true to pass and return a true to you, or throw an `AssertException`
target - The tareget to evaluate for being true, it can also be a closure that will be evaluated at runtimemessage - The message to send in the exceptioneval
statement - A CFML statement to evaluatedirectoryExecute a snippet of code in the context of a directory
code - CFML code to runscript - is the CFML code script or tagsdirectory - Absolute path to a directory context to run invars - Struct of vars to set so the code can access themExecute an existing file
template - Absolute path to a .cfm to executevars - Struct of vars to set so the template can access them