Patterns methods
clearCache( patternName, directoryOverride )
Removes a pattern from cache.
patternNameThe name of the pattern filedirectoryOverrideIf the cached pattern was originally retrieved also usingdirectoryOverride, the same value needs to be specified here.
parse**( patternName, setup )**
Parses a pattern
patternNameThe name of the pattern filesetupOptional hash arraydirectoryOverrideWhen specified, the pattern is taken from this directory instead of the default configured directory.noParseWhen set to true, the pattern is returned without any parsing.fileToIncludeBeforeParsingA file or an array of files to include whenever parsing this set files, usually for defining variables that can be later used inside the pattern.variablesA hash array of variables passed to be available when parsing the pattern.
Returns: The parsed pattern, or false if failed.
out( patternName, setup, code )
Parses a pattern and sets the result as the output response payload.
patternNameThe name of the pattern filesetupOptional hash array: The options to be passed to the parse methodcodeOptional integer: The response code, one of the available RESPONSE_*
Last updated
Was this helpful?