testbox.system.util

Class Util

railo-context.Component
        extended by testbox.system.util.Util
Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  

    The main ColdBox utility library filled with lots of nice goodies.

    Method Summary
    struct arrayToStruct(array in)
         Convert an array to struct argument notation.
    string fileLastModified(any filename)
         Get the last modified date of a file.
    string getAbsolutePath(any path)
         Turn any system path, either relative or absolute, into a fully qualified one.
    any getMixerUtil()
         Get the mixer utility.
    boolean inThread()
         Check if you are in cfthread or not for any CFML Engine.
    string ripExtension(any filename)
         Rip the extension of a filename.
    string slugify(string str, [numeric maxLength='0'], [string allow=''])
         Create a URL safe slug from a string.
     
    Methods inherited from class railo-context.Component
    None

    Method Detail

    arrayToStruct

    public struct arrayToStruct(array in)

    Convert an array to struct argument notation

    Parameters:
    in - The array to convert

    fileLastModified

    public string fileLastModified(any filename)

    Get the last modified date of a file

    Parameters:
    filename

    getAbsolutePath

    public string getAbsolutePath(any path)

    Turn any system path, either relative or absolute, into a fully qualified one

    Parameters:
    path

    getMixerUtil

    public any getMixerUtil()

    Get the mixer utility


    inThread

    public boolean inThread()

    Check if you are in cfthread or not for any CFML Engine


    ripExtension

    public string ripExtension(any filename)

    Rip the extension of a filename.

    Parameters:
    filename

    slugify

    public string slugify(string str, [numeric maxLength='0'], [string allow=''])

    Create a URL safe slug from a string

    Parameters:
    str - The string to slugify
    maxLength - The maximum number of characters for the slug
    allow - a regex safe list of additional characters to allow