ColdFusion On Wheels 1.1 Beta 1

wheels
Class Dispatch

WEB-INF.cftags.component
        extended by wheelsMapping.Dispatch

public class Dispatch
extends WEB-INF.cftags.component

Method Summary
 string $URLEncode([string param=''])
 void $abort()
 void $abortInvalidRequest()
 void $addToCache(string key, any value, [numeric time='[runtime expression]'], [string category='main'])
 void $args(struct args, string name, [string reserved=''], [string combine=''])
 any $cache()
 numeric $cacheCount([string category=''])
 any $cachedControllerClassExists(string name)
 any $cachedModelClassExists(string name)
 struct $cgiScope([string keys='request_method,http_x_requested_with,http_referer,server_name,path_info,script_name,query_string,remote_addr,server_port,server_port_secure,server_protocol,http_host,http_accept,content_type'])
          This copies all the variables Wheels needs from the CGI scope to the request scope
 boolean $checkMinimumVersion(string version, string minversion)
 void $clearCache([string category=''])
 any $clearControllerInitializationCache()
 any $clearModelInitializationCache()
 void $combineArguments(struct args, string combine, [boolean required='false'], [string extendedInfo=''])
 string $constructParams(string params, [string $URLRewriting='[runtime expression]'])
 any $content()
 any $controller(string name)
 string $convertToString(Any value)
 any $createControllerClass(string name, [string controllerPaths='[runtime expression]'], [string type='controller'])
 any $createModelClass(string name, [string modelPaths='[runtime expression]'], [string type='model'])
 struct $createNestedParamStruct(struct params)
 any $createObjectFromRoot(string path, string fileName, string method)
 struct $createParams(string path, string format, struct route, struct formScope, struct urlScope)
 any $dbinfo()
 void $debugPoint(string name)
 struct $deprecated([string message='You are using deprecated behavior which will be removed from the next major or minor release.'], [boolean announce='true'])
 any $directory()
 struct $dollarify(struct input, string on)
 any $doubleCheckedLock(string name, string condition, string execute, [struct conditionArgs='[runtime expression]'], [struct executeArgs='[runtime expression]'], [numeric timeout='30'])
 void $dump(any var, [boolean abort='true'])
 any $file()
 boolean $fileExistsNoCase(string absolutePath)
 struct $findMatchingRoute(string path, string format)
 struct $findRoute()
 string $getFormatFromRequest(string pathInfo)
 any $getFromCache(string key, [string category='main'])
 string $getPathFromRequest(string pathInfo, string scriptName)
 string $hashedKey()
          Creates a unique string based on any arguments passed in (used as a key for caching mostly)
 void $header()
 void $htmlhead()
 struct $image()
 void $include(string template)
 void $includeAndOutput(string template)
 string $includeAndReturnOutput(string $template)
 any $init()
 any $invoke()
 any $listClean(string list, [string delim=','], [string returnAs='string'])
          removes whitespace between list elements
 void $loadPlugins()
 void $loadRoutes()
 void $location([boolean delay='false'])
 void $mail()
 void $mapStruct(struct map, struct struct, [string path=''])
 any $namedReadLock(string name, any object, string method, [struct args='[runtime expression]'], [numeric timeout='30'])
 string $objectFileName(string name, string objectPath, string type)
 void $objectcache()
 void $removeFromCache(string key, [string category='main'])
 string $request([string pathInfo='[runtime expression]'], [string scriptName='[runtime expression]'], [struct formScope='[runtime expression]'], [struct urlScope='[runtime expression]'])
 string $routeVariables()
 void $setNamedRoutePositions()
 void $setting()
 any $simpleLock(string execute, [struct executeArgs='[runtime expression]'], [numeric timeout='30'])
 string $singularizeOrPluralize(string text, string which, [numeric count='-1'], [boolean returnCount='true'])
          Called by singularize and pluralize to perform the conversion
 boolean $structKeysExist(struct struct, [string keys=''])
          Check to see if all keys in the list exist for the structure and have length
 void $throw()
 any $timeSpanForCache(any cache, [numeric defaultCacheTime='[runtime expression]'], [string cacheDatePart='[runtime expression]'])
 xml $toXml(any data)
 any $wddx(any input, [string action='cfml2wddx'], [boolean useTimeZoneInfo='true'])
 any $zip()
 string URLFor([string route=''], [string controller=''], [string action=''], [any key=''], [string params=''], [string anchor=''], [boolean onlyPath], [string host], [string protocol], [numeric port], [string $URLRewriting='[runtime expression]'])
          Creates an internal URL based on supplied arguments
 void addDefaultRoutes()
          Adds the default Wheels routes (for example, `[controller]/[action]/[key]`, etc
 void addFormat(string extension, string mimeType)
          Adds a new MIME format to your Wheels application for use with responding to multiple formats
 void addRoute([string name=''], string pattern, [string controller=''], [string action=''])
          Adds a new route to your application
 string capitalize(string text)
          Returns the text with the first character converted to uppercase
 string deobfuscateParam(string param)
          Deobfuscates a value
 any get(string name, [string functionName=''])
          Returns the current setting for the supplied Wheels setting or the current default for the supplied Wheels function argument
 string humanize(string text)
          Returns readable text by capitalizing and converting camel casing to multiple words
 string hyphenize(string string)
          Converts camelCase strings to lowercase strings with hyphens as word delimiters instead
 string mimeTypes(string extension, [string fallback='application/octet-stream'])
          Returns an associated MIME type based on a file extension
 any model(string name)
          Returns a reference to the requested model so that class level methods can be called on it
 string obfuscateParam(any param)
          Obfuscates a value
 string pluginNames()
          Returns a list of all installed plugins' names
 string pluralize(string word, [numeric count='-1'], [boolean returnCount='true'])
          Returns the plural form of the passed in word
 void set()
          Use to configure a global setting or set a default for a function
 string singularize(string word)
          Returns the singular form of the passed in word
 string toXHTML(string text)
          Returns an XHTML-compliant string
 
Methods inherited from class WEB-INF.cftags.component
 

Method Detail

$URLEncode

public string $URLEncode([string param=''])

Parameters:
param

$abort

public void $abort()


$abortInvalidRequest

public void $abortInvalidRequest()


$addToCache

public void $addToCache(string key, any value, [numeric time='[runtime expression]'], [string category='main'])

Parameters:
key
value
time
category

$args

public void $args(struct args, string name, [string reserved=''], [string combine=''])

Parameters:
args
name
reserved
combine

$cache

public any $cache()


$cacheCount

public numeric $cacheCount([string category=''])

Parameters:
category

$cachedControllerClassExists

public any $cachedControllerClassExists(string name)

Parameters:
name

$cachedModelClassExists

public any $cachedModelClassExists(string name)

Parameters:
name

$cgiScope

public struct $cgiScope([string keys='request_method,http_x_requested_with,http_referer,server_name,path_info,script_name,query_string,remote_addr,server_port,server_port_secure,server_protocol,http_host,http_accept,content_type'])
This copies all the variables Wheels needs from the CGI scope to the request scope.

Parameters:
keys

$checkMinimumVersion

public boolean $checkMinimumVersion(string version, string minversion)

Parameters:
version
minversion

$clearCache

public void $clearCache([string category=''])

Parameters:
category

$clearControllerInitializationCache

public any $clearControllerInitializationCache()


$clearModelInitializationCache

public any $clearModelInitializationCache()


$combineArguments

public void $combineArguments(struct args, string combine, [boolean required='false'], [string extendedInfo=''])

Parameters:
args
combine
required
extendedInfo

$constructParams

public string $constructParams(string params, [string $URLRewriting='[runtime expression]'])

Parameters:
params
$URLRewriting

$content

public any $content()


$controller

public any $controller(string name)

Parameters:
name

$convertToString

public string $convertToString(Any value)

Parameters:
value

$createControllerClass

public any $createControllerClass(string name, [string controllerPaths='[runtime expression]'], [string type='controller'])

Parameters:
name
controllerPaths
type

$createModelClass

public any $createModelClass(string name, [string modelPaths='[runtime expression]'], [string type='model'])

Parameters:
name
modelPaths
type

$createNestedParamStruct

public struct $createNestedParamStruct(struct params)

Parameters:
params

$createObjectFromRoot

public any $createObjectFromRoot(string path, string fileName, string method)

Parameters:
path
fileName
method

$createParams

public struct $createParams(string path, string format, struct route, struct formScope, struct urlScope)

Parameters:
path
format
route
formScope
urlScope

$dbinfo

public any $dbinfo()


$debugPoint

public void $debugPoint(string name)

Parameters:
name

$deprecated

public struct $deprecated([string message='You are using deprecated behavior which will be removed from the next major or minor release.'], [boolean announce='true'])

Parameters:
message
announce

$directory

public any $directory()


$dollarify

public struct $dollarify(struct input, string on)

Parameters:
input
on

$doubleCheckedLock

public any $doubleCheckedLock(string name, string condition, string execute, [struct conditionArgs='[runtime expression]'], [struct executeArgs='[runtime expression]'], [numeric timeout='30'])

Parameters:
name
condition
execute
conditionArgs
executeArgs
timeout

$dump

public void $dump(any var, [boolean abort='true'])

Parameters:
var
abort

$file

public any $file()


$fileExistsNoCase

public boolean $fileExistsNoCase(string absolutePath)

Parameters:
absolutePath

$findMatchingRoute

public struct $findMatchingRoute(string path, string format)

Parameters:
path
format

$findRoute

public struct $findRoute()


$getFormatFromRequest

public string $getFormatFromRequest(string pathInfo)

Parameters:
pathInfo

$getFromCache

public any $getFromCache(string key, [string category='main'])

Parameters:
key
category

$getPathFromRequest

public string $getPathFromRequest(string pathInfo, string scriptName)

Parameters:
pathInfo
scriptName

$hashedKey

public string $hashedKey()
Creates a unique string based on any arguments passed in (used as a key for caching mostly).


$header

public void $header()


$htmlhead

public void $htmlhead()


$image

public struct $image()


$include

public void $include(string template)

Parameters:
template

$includeAndOutput

public void $includeAndOutput(string template)

Parameters:
template

$includeAndReturnOutput

public string $includeAndReturnOutput(string $template)

Parameters:
$template

$init

public any $init()


$invoke

public any $invoke()


$listClean

public any $listClean(string list, [string delim=','], [string returnAs='string'])
removes whitespace between list elements. optional argument to return the list as an array.

Parameters:
list
delim
returnAs

$loadPlugins

public void $loadPlugins()


$loadRoutes

public void $loadRoutes()


$location

public void $location([boolean delay='false'])

Parameters:
delay

$mail

public void $mail()


$mapStruct

public void $mapStruct(struct map, struct struct, [string path=''])

Parameters:
map
struct
path

$namedReadLock

public any $namedReadLock(string name, any object, string method, [struct args='[runtime expression]'], [numeric timeout='30'])

Parameters:
name
object
method
args
timeout

$objectFileName

public string $objectFileName(string name, string objectPath, string type)

Parameters:
name
objectPath
type - Can be either `controller` or `model`.

$objectcache

public void $objectcache()


$removeFromCache

public void $removeFromCache(string key, [string category='main'])

Parameters:
key
category

$request

public string $request([string pathInfo='[runtime expression]'], [string scriptName='[runtime expression]'], [struct formScope='[runtime expression]'], [struct urlScope='[runtime expression]'])

Parameters:
pathInfo
scriptName
formScope
urlScope

$routeVariables

public string $routeVariables()


$setNamedRoutePositions

public void $setNamedRoutePositions()


$setting

public void $setting()


$simpleLock

public any $simpleLock(string execute, [struct executeArgs='[runtime expression]'], [numeric timeout='30'])

Parameters:
execute
executeArgs
timeout

$singularizeOrPluralize

public string $singularizeOrPluralize(string text, string which, [numeric count='-1'], [boolean returnCount='true'])
Called by singularize and pluralize to perform the conversion.

Parameters:
text
which
count
returnCount

$structKeysExist

public boolean $structKeysExist(struct struct, [string keys=''])
Check to see if all keys in the list exist for the structure and have length.

Parameters:
struct
keys

$throw

public void $throw()


$timeSpanForCache

public any $timeSpanForCache(any cache, [numeric defaultCacheTime='[runtime expression]'], [string cacheDatePart='[runtime expression]'])

Parameters:
cache
defaultCacheTime
cacheDatePart

$toXml

public xml $toXml(any data)

Parameters:
data

$wddx

public any $wddx(any input, [string action='cfml2wddx'], [boolean useTimeZoneInfo='true'])

Parameters:
input
action
useTimeZoneInfo

$zip

public any $zip()


URLFor

public string URLFor([string route=''], [string controller=''], [string action=''], [any key=''], [string params=''], [string anchor=''], [boolean onlyPath], [string host], [string protocol], [numeric port], [string $URLRewriting='[runtime expression]'])
Creates an internal URL based on supplied arguments.

Parameters:
route - Name of a route that you have configured in `config/routes.cfm`.
controller - Name of the controller to include in the URL.
action - Name of the action to include in the URL.
key - Key(s) to include in the URL.
params - Any additional params to be set in the query string.
anchor - Sets an anchor name to be appended to the path.
onlyPath - If `true`, returns only the relative URL (no protocol, host name or port).
host - Set this to override the current host.
protocol - Set this to override the current protocol.
port - Set this to override the current port number.
$URLRewriting

addDefaultRoutes

public void addDefaultRoutes()
Adds the default Wheels routes (for example, `[controller]/[action]/[key]`, etc.) to your application. Only use this method if you have set `loadDefaultRoutes` to `false` and want to control exactly where in the route order you want to place the default routes.


addFormat

public void addFormat(string extension, string mimeType)
Adds a new MIME format to your Wheels application for use with responding to multiple formats.

Parameters:
extension - File extension to add.
mimeType - Matching MIME type to associate with the file extension.

addRoute

public void addRoute([string name=''], string pattern, [string controller=''], [string action=''])
Adds a new route to your application.

Parameters:
name - Name for the route. This is referenced as the `name` argument in functions based on @URLFor like @linkTo, @startFormTag, etc.
pattern - The URL pattern that the route will match.
controller - Controller to call when route matches (unless the controller name exists in the pattern).
action - Action to call when route matches (unless the action name exists in the pattern).

capitalize

public string capitalize(string text)
Returns the text with the first character converted to uppercase.

Parameters:
text - Text to capitalize.

deobfuscateParam

public string deobfuscateParam(string param)
Deobfuscates a value.

Parameters:
param - Value to deobfuscate.

get

public any get(string name, [string functionName=''])
Returns the current setting for the supplied Wheels setting or the current default for the supplied Wheels function argument.

Parameters:
name - Variable name to get setting for.
functionName - Function name to get setting for.

humanize

public string humanize(string text)
Returns readable text by capitalizing and converting camel casing to multiple words.

Parameters:
text - Text to humanize.

hyphenize

public string hyphenize(string string)
Converts camelCase strings to lowercase strings with hyphens as word delimiters instead. Example: `myVariable` becomes `my-variable`.

Parameters:
string - The string to hyphenize.

mimeTypes

public string mimeTypes(string extension, [string fallback='application/octet-stream'])
Returns an associated MIME type based on a file extension.

Parameters:
extension - The extension to get the MIME type for.
fallback - the fallback MIME type to return.

model

public any model(string name)
Returns a reference to the requested model so that class level methods can be called on it.

Parameters:
name - Name of the model to get a reference to.

obfuscateParam

public string obfuscateParam(any param)
Obfuscates a value. Typically used for hiding primary key values when passed along in the URL.

Parameters:
param - Value to obfuscate.

pluginNames

public string pluginNames()
Returns a list of all installed plugins' names.


pluralize

public string pluralize(string word, [numeric count='-1'], [boolean returnCount='true'])
Returns the plural form of the passed in word. Can also pluralize a word based on a value passed to the `count` argument.

Parameters:
word - The word to pluralize.
count - Pluralization will occur when this value is not `1`.
returnCount - Will return `count` prepended to the pluralization when `true` and `count` is not `-1`.

set

public void set()
Use to configure a global setting or set a default for a function.


singularize

public string singularize(string word)
Returns the singular form of the passed in word.

Parameters:
word - String to singularize.

toXHTML

public string toXHTML(string text)
Returns an XHTML-compliant string.

Parameters:
text - String to make XHTML-compliant.

ColdFusion On Wheels 1.1 Beta 1