[[Dashboard | << Back to Dashboard ]] {| align="right" | __TOC__ |} = Exploring the Utilities Plugin = == Overview == This is a Utilities CFC == _deserialize == Deserialize a byte array === Returns === * This function returns ''Any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | binaryString || string || Yes || --- || The byte array string to deserialize |} === Examples === == queryStringToStruct == Converts a querystring into a struct of name value pairs === Returns === * This function returns ''struct'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | qs || string || Yes || || The query string |} === Examples === == marshallData == Marshall data according to type === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | type || string || Yes || --- || The type to marshal to. Valid values are JSON, XML, WDDX, PLAIN, HTML, TEXT |- | data || any || Yes || --- || The data to marshal |- | encoding || string || No || utf-8 || The default character encoding to use |- | jsonCase || string || No || lower || JSON Only: Whether to use lower case, upper case or no (none) case translations in the JSON transformation. Lower is default |- | jsonQueryFormat || string || No || query || JSON Only: query or array |- | xmlColumnList || string || No || || XML Only: Choose which columns to inspect, by default it uses all the columns in the query, if using a query |- | xmlUseCDATA || boolean || No || false || XML Only: Use CDATA content for ALL values. The default is false |- | xmlListDelimiter || string || No || , || XML Only: The delimiter in the list. Comma by default |- | xmlRootName || string || No || || XML Only: The name of the initial root element of the XML packet |} === Examples === == sleeper == Make the main thread of execution sleep for X amount of seconds. === Returns === * This function returns ''void'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | milliseconds || numeric || Yes || --- || Milliseconds to sleep |} === Examples === == isCFUUID == Checks if a passed string is a valid UUID. === Returns === * This function returns ''boolean'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | inStr || string || Yes || --- || |} === Examples === == _serialize == Serialize complex objects that implement serializable. Returns a binary string. === Returns === * This function returns ''string'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | complexObject || any || Yes || --- || Any coldfusion primative data type and if cf8 componetns. |} === Examples === == _deserializeFromFile == Deserialize a byte array from a file === Returns === * This function returns ''Any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | fileSource || string || Yes || --- || The absolute path to the source file to deserialize |} === Examples === == isSSL == Tells you if you are in SSL mode or not. === Returns === * This function returns ''boolean'' === Examples === == _serializeToFile == Serialize complex objects that implement serializable, into a file. === Returns === * This function returns ''void'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | complexObject || any || Yes || --- || Any coldfusion primative data type and if cf8 componetns. |- | fileDestination || string || Yes || --- || The absolute path to the destination file to write to |} === Examples === == placeHolderReplacer == PlaceHolder Replacer for strings containing ${} patterns === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | str || any || Yes || --- || The string variable to look for replacements |- | settings || any || Yes || --- || The structure of settings to use in replacing |} === Examples ===