ColdBox Platform Version 2.6.4

coldbox.system.core.util
Class Util

WEB-INF.cftags.component
        extended by coldbox.system.core.util.Util

public class Util
extends WEB-INF.cftags.component

The main ColdBox utility library.


Method Summary
 void abortit()
          Facade for cfabort
 struct arrayToStruct(array in)
          Convert an array to struct argument notation
 void convertToColdBox(string family, any target)
          Decorate an object as a ColdBox object
 void dumpit(any var, [boolean isAbort='false'])
          Facade for cfmx dump
 string fileLastModified(string filename)
          Get the last modified date of a file
 string getAbsolutePath(string path)
          Turn any system path, either relative or absolute, into a fully qualified one
 any getPropertyMixin(string name, [string scope='variables'], [any default])
          gets a property
 boolean inThread()
          Check if you are in cfthread or not
 void includeit(string template)
          Facade for cfinclude
 void injectPropertyMixin(string propertyName, any propertyValue, [string scope='variables'])
          injects a property into the passed scope
 void injectUDFMixin([any name], [any UDF])
          injects a method into the CFC scope
 boolean isFamilyType(string family, any target)
          Checks if an object is of the passed in family type
 boolean isInstanceCheck(any obj, string family='')
          Checks if an object is of a certain type of family via inheritance
 any placeHolderReplacer(any str, any settings)
          PlaceHolder Replacer for strings containing ${} patterns
 void relocate(string url, [boolean addtoken='false'])
          Facade for cflocation
 void rethrowit(any throwObject)
          Rethrow an exception
 string ripExtension(string filename)
          Rip the extension of a filename
 any throwit(string message, [string detail=''], [string type='Framework'])
          Facade for cfthrow
 
Methods inherited from class WEB-INF.cftags.component
 

Method Detail

abortit

public void abortit()
Facade for cfabort


arrayToStruct

public struct arrayToStruct(array in)
Convert an array to struct argument notation

Parameters:
in - The array to convert

convertToColdBox

public void convertToColdBox(string family, any target)
Decorate an object as a ColdBox object

Parameters:
family - The family to covert it to: handler, plugin, interceptor
target - The target object

dumpit

public void dumpit(any var, [boolean isAbort='false'])
Facade for cfmx dump

Parameters:
var
isAbort - Abort also

fileLastModified

public string fileLastModified(string filename)
Get the last modified date of a file

Parameters:
filename

getAbsolutePath

public string getAbsolutePath(string path)
Turn any system path, either relative or absolute, into a fully qualified one

Parameters:
path - Abstract pathname

getPropertyMixin

public any getPropertyMixin(string name, [string scope='variables'], [any default])
gets a property

Parameters:
name - The name of the property to inject.
scope - The scope to which inject the property to.
default - Default value to return

inThread

public boolean inThread()
Check if you are in cfthread or not


includeit

public void includeit(string template)
Facade for cfinclude

Parameters:
template

injectPropertyMixin

public void injectPropertyMixin(string propertyName, any propertyValue, [string scope='variables'])
injects a property into the passed scope

Parameters:
propertyName - The name of the property to inject.
propertyValue - The value of the property to inject
scope - The scope to which inject the property to.

injectUDFMixin

public void injectUDFMixin([any name], [any UDF])
injects a method into the CFC scope

Parameters:
name
UDF

isFamilyType

public boolean isFamilyType(string family, any target)
Checks if an object is of the passed in family type

Parameters:
family - The family to covert it to: handler, plugin, interceptor
target - The target object

isInstanceCheck

public boolean isInstanceCheck(any obj, string family='')
Checks if an object is of a certain type of family via inheritance

Parameters:
obj - The object to evaluate
family - The family string to check

placeHolderReplacer

public any placeHolderReplacer(any str, any settings)
PlaceHolder Replacer for strings containing ${} patterns

Parameters:
str - The string variable to look for replacements
settings - The structure of settings to use in replacing

relocate

public void relocate(string url, [boolean addtoken='false'])
Facade for cflocation

Parameters:
url
addtoken

rethrowit

public void rethrowit(any throwObject)
Rethrow an exception

Parameters:
throwObject - The exception object

ripExtension

public string ripExtension(string filename)
Rip the extension of a filename.

Parameters:
filename

throwit

public any throwit(string message, [string detail=''], [string type='Framework'])
Facade for cfthrow

Parameters:
message
detail
type

ColdBox Platform Version 2.6.4