All pages
Powered by GitBook
1 of 66

Built-in Functions

cache

CacheCount

Get how many items are in the cache.

By default, the {@code cacheName} is set to {@code default}.

Method Signature

CacheCount(cacheName=[string])

Arguments

Argument
Type
Required
Description
Default

cacheName

string

false

The cache name to retrieve the data from, defaults to {@code default}

default

Examples

Related

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheGetAsAttempt

Get an item from the cache and return it as a Java {@link Optional}.

By default, the {@code cacheName} is set to {@code default}.

Method Signature

CacheGetAsAttempt(id=[string], cacheName=[string])

Arguments

Argument
Type
Required
Description
Default

id

string

true

The cache id to retrieve

cacheName

string

false

The cache name to retrieve the id from, defaults to {@code default}

default

Examples

Related

  • CacheCount

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheRegionRemove

Checks if the cache region exists.

Method Signature

CacheRegionRemove(region=[string])

Arguments

Argument
Type
Required
Description
Default

region

string

true

The cache region to check for existence.

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheRemoveAll

Removes all stored objects in a cache region.

If no cache region is specified, objects in the default region are removed.

Method Signature

CacheRemoveAll(cacheName=[string])

Arguments

Argument
Type
Required
Description
Default

cacheName

string

false

The name of the cache to get the keys from. Default is the default cache.

default

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CachePut

Get an item from the cache.

If the item is not found, the default value will be returned if provided, else null will be returned. By default, the {@code cacheName} is set to {@code default}.

Method Signature

CachePut(id=[any], value=[any], timespan=[any], idleTime=[any], cacheName=[string])

Arguments

Argument
Type
Required
Description
Default

id

any

true

The cache id to store

value

any

true

The value to store in the cache

timespan

any

false

The duration for the cache to expire in seconds

idleTime

any

false

The duration for the cache to expire after last access in seconds

cacheName

string

false

The cache name to retrieve the id from, defaults to {@code default}

default

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheRegionExists

Checks if the cache region exists.

Method Signature

CacheRegionExists(region=[string])

Arguments

Argument
Type
Required
Description
Default

region

string

true

The cache region to check for existence.

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheGetSession

Lets you retrieve the underlying cache object to access additional cache functionality that is not implemented in the tag cfcache.

Method Signature

CacheGetSession(objectType=[string], isKey=[boolean])

Arguments

Argument
Type
Required
Description
Default

objectType

string

false

default

isKey

boolean

false

false

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheGetEngineProperties

Returns some properties of the cache engine

Method Signature

CacheGetEngineProperties()

Arguments

This function does not accept any arguments

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheGet

Get an item from the cache.

If the item is not found, the default value will be returned if provided, else null will be returned. By default, the {@code cacheName} is set to {@code default}.

Method Signature

CacheGet(id=[any], cacheName=[any], throwWhenNotExist=[any])

Arguments

Argument
Type
Required
Description
Default

id

any

true

The cache id to retrieve, or an array of ids to retrieve

cacheName

any

false

The cache name to retrieve the id from, defaults to {@code default}

default

throwWhenNotExist

any

false

false

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheGetDefaultCacheName

Returns the default cache name for the specified type.

Method Signature

CacheGetDefaultCacheName(type=[string])

Arguments

Argument
Type
Required
Description
Default

type

string

true

The type of cache to get the default cache name for.

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheGetProperties

Returns some properties of the cache engine

Method Signature

CacheGetProperties(cacheName=[string])

Arguments

Argument
Type
Required
Description
Default

cacheName

string

false

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheSetProperties

Returns some properties of the cache engine

Method Signature

CacheSetProperties()

Arguments

This function does not accept any arguments

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheGetAllIds

Get all the keys in the cache.

If no cache name is provided, the default cache is used. If a filter is provided, only keys that match the filter will be returned. A filter is a simple string that can contain wildcards and will leverage the {@link WildcardFilter} to match keys.

Method Signature

CacheGetAllIds(filter=[string], cacheName=[string], useRegex=[boolean])

Arguments

Argument
Type
Required
Description
Default

filter

string

false

The filter to apply to the keys, this can be a simple Wildcard filter or a regex filter. The default is a simple wildcard filter.

cacheName

string

false

The name of the cache to get the keys from. Default is the default cache.

default

useRegex

boolean

false

If true, the filter will be treated as a full regular expression filter. Default is false.

false

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheIdExists

Lookup the id in the cache to see if it exists or not.

The id can be a single id or an array of IDs By default, the {@code cacheName} is set to {@code default}. You can also pass in a filter

Method Signature

CacheIdExists(id=[any], cacheName=[string])

Arguments

Argument
Type
Required
Description
Default

id

any

true

The cache id to retrieve, or an array of ids to retrieve

cacheName

string

false

The cache name to retrieve the id from, defaults to {@code default}

default

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

cacheKeyExists

Lookup the id in the cache to see if it exists or not.

The id can be a single id or an array of IDs By default, the {@code cacheName} is set to {@code default}. You can also pass in a filter

Method Signature

cacheKeyExists(id=[any], cacheName=[string])

Arguments

Argument
Type
Required
Description
Default

id

any

true

The cache id to retrieve, or an array of ids to retrieve

cacheName

string

false

The cache name to retrieve the id from, defaults to {@code default}

default

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheRemove

Deletes a single element from the cache.

Method Signature

CacheRemove(id=[any], throwOnError=[boolean], cacheName=[string])

Arguments

Argument
Type
Required
Description
Default

id

any

true

A single ID or an array of IDs to remove from the cache.

throwOnError

boolean

false

If true, throw an exception if the key is not found. Default is false.

false

cacheName

string

false

The name of the cache to get the keys from. Default is the default cache.

default

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

cacheDelete

Deletes a single element from the cache.

Method Signature

cacheDelete(id=[any], throwOnError=[boolean], cacheName=[string])

Arguments

Argument
Type
Required
Description
Default

id

any

true

A single ID or an array of IDs to remove from the cache.

throwOnError

boolean

false

If true, throw an exception if the key is not found. Default is false.

false

cacheName

string

false

The name of the cache to get the keys from. Default is the default cache.

default

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheGetAll

Get all the objects in the cache.

Careful, use this with caution as it can be a very expensive operation. Use a filter if possible please, since the default filter is EVERYTHING.

If no cache name is provided, the default cache is used. If a filter is provided, only keys that match the filter will be returned. A filter is a simple string that can contain wildcards and will leverage the {@link WildcardFilter} to match keys.

Method Signature

CacheGetAll(filter=[string], cacheName=[string], useRegex=[boolean])

Arguments

Argument
Type
Required
Description
Default

filter

string

false

The filter to apply to the keys, this can be a simple Wildcard filter or a regex filter. The default is a simple wildcard filter.

*

cacheName

string

false

The name of the cache to get the keys from. Default is the default cache.

default

useRegex

boolean

false

If true, the filter will be treated as a full regular expression filter. Default is false.

false

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheGetMetadata

Get the item metadata for a specific entry or entries.

By default, the {@code cacheName} is set to {@code default}.

The default metadata for a BoxCache is:

  • cacheName : The cachename the entry belongs to

  • hits : How many hits the entry has

  • timeout : The timeout in seconds

  • lastAccessTimeout : The last access timeout in seconds

  • created : When the entry was created

  • lastAccessed : When the entry was last accessed

  • key : The key used to cache it

  • metadata : Any extra metadata stored with the entry

  • isEternal : If the object has a timeout of 0

Method Signature

CacheGetMetadata(id=[any], cacheName=[string])

Arguments

Argument
Type
Required
Description
Default

id

any

true

cacheName

string

false

The cache name to retrieve the id from, defaults to {@code default}

default

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetOrFail

  • CacheClear

  • CacheRegionNew

CacheGetOrFail

Get an item from the cache, it will throw an exception if the id is not found in the cache.

By default, the {@code cacheName} is set to {@code default}.

Method Signature

CacheGetOrFail(id=[string], cacheName=[string])

Arguments

Argument
Type
Required
Description
Default

id

string

true

The cache id to retrieve

cacheName

string

false

The cache name to retrieve the id from, defaults to {@code default}

default

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheClear

  • CacheRegionNew

CacheClear

Clear an id or an array of id's from the specified cache.

If no cache name is provided, the default cache is used.

Method Signature

CacheClear(filterOrTags=[any], cacheName=[string])

Arguments

Argument
Type
Required
Description
Default

filterOrTags

any

false

cacheName

string

false

The name of the cache to get the keys from. Default is the default cache.

default

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheRegionNew

CacheRegionNew

Checks if the cache region exists.

Method Signature

CacheRegionNew(region=[string], properties=[struct], throwOnError=[boolean])

Arguments

Argument
Type
Required
Description
Default

region

string

true

The cache region to check for existence.

properties

struct

true

throwOnError

boolean

false

false

Examples

Related

  • CacheCount

  • CacheGetAsAttempt

  • CacheRegionRemove

  • CacheRemoveAll

  • CachePut

  • CacheRegionExists

  • CacheGetSession

  • CacheGetEngineProperties

  • CacheGet

  • CacheGetDefaultCacheName

  • CacheGetProperties

  • CacheSetProperties

  • CacheGetAllIds

  • CacheIdExists

  • cacheKeyExists

  • CacheRemove

  • cacheDelete

  • CacheGetAll

  • CacheGetMetadata

  • CacheGetOrFail

  • CacheClear

conversion

JSONDeserialize

Converts a JSON (JavaScript Object Notation) string data representation into data, such as a structure or array.

Method Signature

JSONDeserialize(json=[string], strictMapping=[boolean], useCustomSerializer=[string])

Arguments

Argument
Type
Required
Description
Default

json

string

true

The JSON string to convert to data.

strictMapping

boolean

false

A Boolean value that specifies whether to convert the JSON strictly. If true, everything becomes structures.

true

useCustomSerializer

string

false

A string that specifies the name of a custom serializer to use. (Not used)

Examples

Related

encryption

Hash

Creates an algorithmic hash of an object and returns it in the CFML compat upper case format

Method Signature

Hash(input=[any], algorithm=[string], encoding=[string], numIterations=[integer])

Arguments

Argument
Type
Required
Description
Default

input

any

true

The item to be hashed

algorithm

string

false

The supported {@link java.security.MessageDigest} algorithm (case-insensitive) or "quick" for an insecure 64-bit hash

MD5

encoding

string

false

Applicable to strings ( default "utf-8" )

utf-8

numIterations

integer

false

1

Examples

Related

  • Hash40

Hash40

Creates an algorithmic hash of an object and returns it in the CFML compat upper case format

Method Signature

Hash40(input=[any], algorithm=[string], encoding=[string], numIterations=[integer])

Arguments

Argument
Type
Required
Description
Default

input

any

true

The item to be hashed

algorithm

string

false

The supported {@link java.security.MessageDigest} algorithm (case-insensitive) or "quick" for an insecure 64-bit hash

MD5

encoding

string

false

Applicable to strings ( default "utf-8" )

utf-8

numIterations

integer

false

1

Examples

Related

  • Hash

format

HTMLCodeFormat

Formats a code string, surrounded by <pre> and </pre>

Method Signature

HTMLCodeFormat(string=[string], version=[string])

Arguments

Argument
Type
Required
Description
Default

string

string

true

The number to format as a U.S. Dollar string.

version

string

false

Examples

Related

  • DollarFormat

DollarFormat

Formats a number as a U.S.

Dollar string with two decimal places, thousands separator, and a dollar sign. If the number is negative, the return value is enclosed in parentheses. If the number is an empty string, the function returns "0.00".

Method Signature

DollarFormat(number=[any])

Arguments

Argument
Type
Required
Description
Default

number

any

true

The number to format as a U.S. Dollar string.

Examples

Related

  • HTMLCodeFormat

struct

DeleteClientVariable

Deletes a client variable.

Returns true if variable was successfully deleted; false if it was not deleted.

Method Signature

DeleteClientVariable(name=[string])

Arguments

Argument
Type
Required
Description
Default

name

string

true

The name of the variable to delete.

Examples

Related

system

Throw

No description available.

Method Signature

Throw(message=[any], type=[String], detail=[String], errorcode=[String], extendedinfo=[any], object=[Throwable])

Arguments

Argument
Type
Required
Description
Default

message

any

false

type

String

false

detail

String

false

errorcode

String

false

extendedinfo

any

false

object

Throwable

false

Examples

Related

  • ObjectSave

  • GetFunctionData

  • GetComponentMetadata

  • GetVariable

  • GetTagData

  • GetClientVariablesList

  • GetContextRoot

  • ObjectLoad

  • SetVariable

ObjectSave

No description available.

Method Signature

ObjectSave(object=[any], file=[string])

Arguments

Argument
Type
Required
Description
Default

object

any

true

file

string

false

Examples

Related

  • Throw

  • GetFunctionData

  • GetComponentMetadata

  • GetVariable

  • GetTagData

  • GetClientVariablesList

  • GetContextRoot

  • ObjectLoad

  • SetVariable

GetFunctionData

Lucee compat: Return information to of a Function as Struct

Method Signature

GetFunctionData(functionName=[string])

Arguments

Argument
Type
Required
Description
Default

functionName

string

true

The BIF function you want information for (Ex: listLen)

Examples

Related

  • Throw

  • ObjectSave

  • GetComponentMetadata

  • GetVariable

  • GetTagData

  • GetClientVariablesList

  • GetContextRoot

  • ObjectLoad

  • SetVariable

GetComponentMetadata

Returns the metadata of a component path or instance in CFML style

Method Signature

GetComponentMetadata(path=[any])

Arguments

Argument
Type
Required
Description
Default

path

any

true

The path to the component.

Examples

Related

  • Throw

  • ObjectSave

  • GetFunctionData

  • GetVariable

  • GetTagData

  • GetClientVariablesList

  • GetContextRoot

  • ObjectLoad

  • SetVariable

GetVariable

Retrieves value of a variable

Method Signature

GetVariable(name=[string])

Arguments

Argument
Type
Required
Description
Default

name

string

true

The name of the variable to get.

Examples

Related

  • Throw

  • ObjectSave

  • GetFunctionData

  • GetComponentMetadata

  • GetTagData

  • GetClientVariablesList

  • GetContextRoot

  • ObjectLoad

  • SetVariable

GetTagData

Lucee compat: Return information to a Tag as Struct

Method Signature

GetTagData(nameSpaceWithSeperator=[string], tagName=[string])

Arguments

Argument
Type
Required
Description
Default

nameSpaceWithSeperator

string

true

The namespace of the tag (Ex: cf)

tagName

string

true

The name of the tag (Ex: mail, http, dbinfo, etc)

Examples

Related

  • Throw

  • ObjectSave

  • GetFunctionData

  • GetComponentMetadata

  • GetVariable

  • GetClientVariablesList

  • GetContextRoot

  • ObjectLoad

  • SetVariable

GetClientVariablesList

Returns the metadata of a component path or instance in CFML style

Method Signature

GetClientVariablesList()

Arguments

This function does not accept any arguments

Examples

Related

  • Throw

  • ObjectSave

  • GetFunctionData

  • GetComponentMetadata

  • GetVariable

  • GetTagData

  • GetContextRoot

  • ObjectLoad

  • SetVariable

GetContextRoot

Gets the context root.

If BoxLang is not running as a servlet-based web server, this always returns "/".

Method Signature

GetContextRoot()

Arguments

This function does not accept any arguments

Examples

Related

  • Throw

  • ObjectSave

  • GetFunctionData

  • GetComponentMetadata

  • GetVariable

  • GetTagData

  • GetClientVariablesList

  • ObjectLoad

  • SetVariable

ObjectLoad

No description available.

Method Signature

ObjectLoad(input=[any])

Arguments

Argument
Type
Required
Description
Default

input

any

true

Examples

Related

  • Throw

  • ObjectSave

  • GetFunctionData

  • GetComponentMetadata

  • GetVariable

  • GetTagData

  • GetClientVariablesList

  • GetContextRoot

  • SetVariable

SetVariable

Sets a variable in the name parameter to the value of the value parameter.

Method Signature

SetVariable(name=[string], value=[any])

Arguments

Argument
Type
Required
Description
Default

name

string

true

The name of the variable to set.

value

any

true

The value to set the variable to.

Examples

Related

  • Throw

  • ObjectSave

  • GetFunctionData

  • GetComponentMetadata

  • GetVariable

  • GetTagData

  • GetClientVariablesList

  • GetContextRoot

  • ObjectLoad

temporal

LSWeek

Provides the Localized BIF and member functions for time units ( e.g.

different locales have different start days to the week )

Method Signature

LSWeek(date=[any], locale=[string], timezone=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

true

The DateTime object or datetime string representation

locale

string

false

The locale string to be parsed and applied to the final result

timezone

string

false

The timezone with which to cast the result

Examples

Related

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

LSDayOfWeek

Provides the Localized BIF and member functions for time units ( e.g.

different locales have different start days to the week )

Method Signature

LSDayOfWeek(date=[any], locale=[string], timezone=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

true

The DateTime object or datetime string representation

locale

string

false

The locale string to be parsed and applied to the final result

timezone

string

false

The timezone with which to cast the result

Examples

Related

  • LSWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

LSIsDate

Determines whether a string is avalid date/time string with either a specific locale or within the current system/application locale

Method Signature

LSIsDate(date=[any], locale=[string], timezone=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

true

The date/time string to check.

locale

string

false

The locale to use for parsing the date/time string.

timezone

string

false

Optional timezone to use for parsing the date/time string.

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

DateCompare

No description available.

Method Signature

DateCompare(date1=[any], date2=[any], datepart=[string])

Arguments

Argument
Type
Required
Description
Default

date1

any

true

date2

any

true

datepart

string

false

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

GetHTTPTimestring

Returns the legacy HTTP TimeString as specified for the now-obsolete RFC 1123/RCF 822.

This method should be used for legacy compatibility with older CFML engines and is not recommended for new code. The updated specification, RFC 2822 should be used for new implemenations.

Method Signature

GetHTTPTimestring(date=[any])

Arguments

Argument
Type
Required
Description
Default

date

any

true

The date value to format

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

LSDateTimeFormat

Formats a date in a locale-specific format

Method Signature

LSDateTimeFormat(date=[any], mask=[string], locale=[string], timezone=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

true

The date string or object

mask

string

false

Optional format mask, or common mask

locale

string

false

Optional locale designation of the output ( e.g. es-SA )

timezone

string

false

Optional specific timezone to apply to the date ( if not present in the date string )

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

LSDateFormat

Formats a date in a locale-specific format

Method Signature

LSDateFormat(date=[any], mask=[string], locale=[string], timezone=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

true

The date string or object

mask

string

false

Optional format mask, or common mask

locale

string

false

Optional locale designation of the output ( e.g. es-SA )

timezone

string

false

Optional specific timezone to apply to the date ( if not present in the date string )

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

LSTimeFormat

Formats a date in a locale-specific format

Method Signature

LSTimeFormat(date=[any], mask=[string], locale=[string], timezone=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

true

The date string or object

mask

string

false

Optional format mask, or common mask

locale

string

false

Optional locale designation of the output ( e.g. es-SA )

timezone

string

false

Optional specific timezone to apply to the date ( if not present in the date string )

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

DayOfWeekAsString

Returns the full day of the week name of a date object. Note that the behavior of this function is not localized, as Sunday is always considered to be the first day of the week.

Method Signature

DayOfWeekAsString(date=[any], timezone=[string], locale=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

false

The numeric integer to extract the day of week or month from.

timezone

string

false

locale

string

false

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

DayOfWeekShortAsString

Returns the short day of the week name of a date object. Note that the behavior of this function is not localized, as Sunday is always considered to be the first day of the week.

Method Signature

DayOfWeekShortAsString(date=[any], timezone=[string], locale=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

false

The numeric integer to extract the day of week or month from.

timezone

string

false

locale

string

false

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

MonthAsString

Returns the full month name of a date object

Method Signature

MonthAsString(date=[any], timezone=[string], locale=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

false

The numeric integer to extract the day of week or month from.

timezone

string

false

locale

string

false

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

MonthShortAsString

Returns the short month name of a date object

Method Signature

MonthShortAsString(date=[any], timezone=[string], locale=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

false

The numeric integer to extract the day of week or month from.

timezone

string

false

locale

string

false

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

ToLegacyDate

Takes a BoxLang DateTime object and converts it to the legacy java.util.Date object used by ACF and Lucee.

Method Signature

ToLegacyDate(date=[any])

Arguments

Argument
Type
Required
Description
Default

date

any

true

The date/time string to convert.

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

createDate

Overload to creatDateTime behavior to account for ACF/Lucee specific manipulations ( e.g.

converting non-century years to current century )

Method Signature

createDate(year=[integer], month=[integer], day=[integer], hour=[integer], minute=[integer], second=[integer], millisecond=[integer], timezone=[string])

Arguments

Argument
Type
Required
Description
Default

year

integer

false

The year of the date-time object.

0

month

integer

false

The month of the date-time object.

1

day

integer

false

The day of the date-time object.

1

hour

integer

false

The hour of the date-time object.

0

minute

integer

false

The minute of the date-time object.

0

second

integer

false

The second of the date-time object.

0

millisecond

integer

false

0

timezone

string

false

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

  • TimeFormat

LSParseDateTime

Parses a locale-specific datetime string or object

Method Signature

LSParseDateTime(date=[any], locale=[string], timezone=[string], format=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

true

the date, datetime string or an object

locale

string

false

timezone

string

false

the timezone to apply to the parsed datetime

format

string

false

the format mask to use in parsing

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • DateTimeFormat

  • DateFormat

  • TimeFormat

DateTimeFormat

No description available.

Method Signature

DateTimeFormat(date=[any], mask=[string], timezone=[string], locale=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

true

mask

string

false

timezone

string

false

locale

string

false

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateFormat

  • TimeFormat

DateFormat

No description available.

Method Signature

DateFormat(date=[any], mask=[string], timezone=[string], locale=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

true

mask

string

false

timezone

string

false

locale

string

false

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • TimeFormat

TimeFormat

No description available.

Method Signature

TimeFormat(date=[any], mask=[string], timezone=[string], locale=[string])

Arguments

Argument
Type
Required
Description
Default

date

any

true

mask

string

false

timezone

string

false

locale

string

false

Examples

Related

  • LSWeek

  • LSDayOfWeek

  • LSIsDate

  • DateCompare

  • GetHTTPTimestring

  • LSDateTimeFormat

  • LSDateFormat

  • LSTimeFormat

  • DayOfWeekAsString

  • DayOfWeekShortAsString

  • MonthAsString

  • MonthShortAsString

  • ToLegacyDate

  • createDate

  • LSParseDateTime

  • DateTimeFormat

  • DateFormat

type

GetMetaData

Gets metadata (the methods, properties, and parameters of a component) associated with an object.

This returns the $bx.meta object for the object.

Method Signature

GetMetaData(value=[any])

Arguments

Argument
Type
Required
Description
Default

value

any

true

The object to get metadata for.

Examples

Related