mura

Class utility

lucee.Component
    extended by mura.cfobject
      extended by mura.utility

This provides global utility methods

Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Constructor Summary
    init(any configBean, any fileWriter)
    Method Summary
    any arrayFind(array array, string stringa)
    any arrayToQuery(array array)
    any backUp()
    any cfformprotect([any event])
    any checkBCryptHash([any string], [any hash])
    any checkForInstanceOf([any obj], [any name])
    any copyDir(any baseDir='', any destDir='', any excludeList='', any sinceDate='', any excludeHiddenFiles='true')
    string createCSSHook([any text=''])
    any createRedirectID(any theLink)
    any createRequiredSiteDirectories(string siteid='', string displaypoolid='')
    any deleteCookie(string name, [boolean maintainCase='true'])
    any deleteDir(any baseDir='')
    any displayErrors(struct error='[runtime expression]')
    any dumpTrace()
    struct filterArgs([struct args], [string badwords])
    any fixLineBreaks([any str])
    any fixOracleClobs([any rs])
    any fixQueryPaths([any rsDir], [any path='directory'])
    any formatError([any exception])
    any getBCrypt()
    any getCryptoSalt([any logRounds='[runtime expression]'], [any reseedFrequency='[runtime expression]'])
    any getEpochTime()
    any getIsoTimeString(date datetime, [boolean convertToUTC='true'])
    struct getNextN([any data], [numeric RecordsPerPage], [numeric startRow], [numeric pageBuffer='5'])
    struct getReCAPTCHAKeys(any event)
    struct getReCAPTCHALanguages()
    any getRequestHost()
    any getRequestProtocol()
    any getStringBytesLength([any str])
    any getUUID()
    boolean isHTTPS()
    boolean isHuman(any event)
    any isValidCFVariableName(String text)
    any joinArrays([any array1], [any array2])
    any leftTrimByBytes([any str=''], [any len='255'])
    any listFix([any list])
    any logEvent(string text='', string file='', string type='Information', boolean application='true')
    any queryAppend(query QueryOne, query QueryTwo)
         This takes two queries and appends the second one to the first one.
    any queryRowToArray([any qry], [any i])
    struct queryRowToStruct(query qry)
    any queryToArray([any qry], [any primarykey=''])
    any queryToStruct([any qry])
    boolean reCAPTCHA(any event)
    string renderFileSize([any size='0'])
    any sanitizeHref([any href])
    string setCamelback([any theString=''])
    any setCookie(string name, string value, [string expires='never'], [boolean maintainCase='true'], [boolean httpOnly='true'])
    void setCookieLegacy(string name, string value, [any expires=''], [string domain=''], [string path='/'], [boolean secure='false'], [boolean httponly='true'], [boolean maintainCase='false'])
         Replacement for cfcookie that handles httponly cookies.
    any setCryptoSalt([any logRounds='[runtime expression]'])
    string setProperCase([any theString=''])
    any setSessionCookies([any reset='true'])
    string stripTags([any text=''], [any tagsToStrip='script,style,embed,object'])
    any suppressDebugging()
    any textPreview(string str, [numeric maxlen='100'], [string finishlist='.|?|!'], [string finishdelim='|'])
    any toBCryptHash([any string], [any logRounds='[runtime expression]'])
    any trimVarchar([any str], [any len])
     
    Methods inherited from class mura.cfobject
    commitTracePoint, convertTimezone, deleteMethod, get, getAsJSON, getAsStruct, getBean, getConfigBean, getCurrentUser, getEventManager, getFeed, getHTTPAttrs, getHTTPService, getJavaTimezone, getPlugin, getPluginManager, getQueryAttrs, getQueryService, getServiceFactory, getSession, getValue, hasCustomDatasource, initTracePoint, inject, injectMethod, invokeMethod, mixin, parseDateArg, removeValue, set, setValue, valueExists
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(any configBean, any fileWriter)

    Parameters:
    configBean
    fileWriter

    Method Detail

    arrayFind

    public any arrayFind(array array, string stringa)

    Parameters:
    array
    stringa

    arrayToQuery

    public any arrayToQuery(array array)

    Parameters:
    array

    backUp

    public any backUp()


    cfformprotect

    public any cfformprotect([any event])

    Parameters:
    event

    checkBCryptHash

    public any checkBCryptHash([any string], [any hash])

    Parameters:
    string
    hash

    checkForInstanceOf

    public any checkForInstanceOf([any obj], [any name])

    Parameters:
    obj
    name

    copyDir

    public any copyDir(any baseDir='', any destDir='', any excludeList='', any sinceDate='', any excludeHiddenFiles='true')

    Parameters:
    baseDir
    destDir
    excludeList
    sinceDate
    excludeHiddenFiles

    createCSSHook

    public string createCSSHook([any text=''])

    Parameters:
    text

    createRedirectID

    public any createRedirectID(any theLink)

    Parameters:
    theLink

    createRequiredSiteDirectories

    public any createRequiredSiteDirectories(string siteid='', string displaypoolid='')

    Parameters:
    siteid
    displaypoolid

    deleteCookie

    public any deleteCookie(string name, [boolean maintainCase='true'])

    Parameters:
    name
    maintainCase

    deleteDir

    public any deleteDir(any baseDir='')

    Parameters:
    baseDir

    displayErrors

    public any displayErrors(struct error='[runtime expression]')

    Parameters:
    error

    dumpTrace

    public any dumpTrace()


    filterArgs

    public struct filterArgs([struct args], [string badwords])

    Parameters:
    args
    badwords

    fixLineBreaks

    public any fixLineBreaks([any str])

    Parameters:
    str

    fixOracleClobs

    public any fixOracleClobs([any rs])

    Parameters:
    rs

    fixQueryPaths

    public any fixQueryPaths([any rsDir], [any path='directory'])

    Parameters:
    rsDir
    path

    formatError

    public any formatError([any exception])

    Parameters:
    exception

    getBCrypt

    public any getBCrypt()


    getCryptoSalt

    public any getCryptoSalt([any logRounds='[runtime expression]'], [any reseedFrequency='[runtime expression]'])

    Parameters:
    logRounds
    reseedFrequency - How often to re-seed.

    getEpochTime

    public any getEpochTime()


    getIsoTimeString

    public any getIsoTimeString(date datetime, [boolean convertToUTC='true'])

    Parameters:
    datetime
    convertToUTC

    getNextN

    public struct getNextN([any data], [numeric RecordsPerPage], [numeric startRow], [numeric pageBuffer='5'])

    Parameters:
    data
    RecordsPerPage
    startRow
    pageBuffer

    getReCAPTCHAKeys

    public struct getReCAPTCHAKeys(any event)

    Parameters:
    event

    getReCAPTCHALanguages

    public struct getReCAPTCHALanguages()


    getRequestHost

    public any getRequestHost()


    getRequestProtocol

    public any getRequestProtocol()


    getStringBytesLength

    public any getStringBytesLength([any str])

    Parameters:
    str

    getUUID

    public any getUUID()


    isHTTPS

    public boolean isHTTPS()


    isHuman

    public boolean isHuman(any event)

    Parameters:
    event

    isValidCFVariableName

    public any isValidCFVariableName(String text)

    Parameters:
    text

    joinArrays

    public any joinArrays([any array1], [any array2])

    Parameters:
    array1
    array2

    leftTrimByBytes

    public any leftTrimByBytes([any str=''], [any len='255'])

    Parameters:
    str
    len

    listFix

    public any listFix([any list])

    Parameters:
    list

    logEvent

    public any logEvent(string text='', string file='', string type='Information', boolean application='true')

    Parameters:
    text
    file
    type
    application

    queryAppend

    public any queryAppend(query QueryOne, query QueryTwo)

    This takes two queries and appends the second one to the first one. This actually updates the first query and does not return anything.

    Parameters:
    QueryOne
    QueryTwo

    queryRowToArray

    public any queryRowToArray([any qry], [any i])

    Parameters:
    qry
    i

    queryRowToStruct

    public struct queryRowToStruct(query qry)

    Parameters:
    qry

    queryToArray

    public any queryToArray([any qry], [any primarykey=''])

    Parameters:
    qry
    primarykey

    queryToStruct

    public any queryToStruct([any qry])

    Parameters:
    qry

    reCAPTCHA

    public boolean reCAPTCHA(any event)

    Parameters:
    event

    renderFileSize

    public string renderFileSize([any size='0'])

    Parameters:
    size

    sanitizeHref

    public any sanitizeHref([any href])

    Parameters:
    href

    setCamelback

    public string setCamelback([any theString=''])

    Parameters:
    theString

    setCookie

    public any setCookie(string name, string value, [string expires='never'], [boolean maintainCase='true'], [boolean httpOnly='true'])

    Parameters:
    name
    value
    expires
    maintainCase
    httpOnly

    setCookieLegacy

    public void setCookieLegacy(string name, string value, [any expires=''], [string domain=''], [string path='/'], [boolean secure='false'], [boolean httponly='true'], [boolean maintainCase='false'])

    Replacement for cfcookie that handles httponly cookies

    Parameters:
    name
    value
    expires - ''=session only|now|never|[date]|[number of days]
    domain
    path
    secure
    httponly
    maintainCase

    setCryptoSalt

    public any setCryptoSalt([any logRounds='[runtime expression]'])

    Parameters:
    logRounds

    setProperCase

    public string setProperCase([any theString=''])

    Parameters:
    theString

    setSessionCookies

    public any setSessionCookies([any reset='true'])

    Parameters:
    reset

    stripTags

    public string stripTags([any text=''], [any tagsToStrip='script,style,embed,object'])

    Parameters:
    text
    tagsToStrip

    suppressDebugging

    public any suppressDebugging()


    textPreview

    public any textPreview(string str, [numeric maxlen='100'], [string finishlist='.|?|!'], [string finishdelim='|'])

    Parameters:
    str
    maxlen - Maximum length
    finishlist - List of finish symbols
    finishdelim - Deliemiter for List of finish symbols

    toBCryptHash

    public any toBCryptHash([any string], [any logRounds='[runtime expression]'])

    Parameters:
    string
    logRounds

    trimVarchar

    public any trimVarchar([any str], [any len])

    Parameters:
    str
    len