| Syntax: | AddEntity( entity : String, char : Character ) |
The AddEntity function makes a new character entity
reference available to the HTML renderer. The function takes two
arguments: the specified unicode character char is mapped
to the specified character entity.
char is a normal MillScript character reference using single quotes. You could write the character using an escape sequence or using the documents character set(UTF-8 by default). See the Strings, characters and Atoms section of the main literals document.
AddEntity( "nbsp", '\ ' );
| Syntax: | AddFunction( name : String, class : String ) |
The AddFunction function makes a new binding in the
relevant package, binding the name to an instance of the
specified Java class. This function expects the specified
class to be an instance of a MillScript Function
org.millscript.millscript.functions.Function. e.g.
AddFunction( "toString", "org.millscript.millscript.functions.ToStringFunction" )
| Syntax: | AddLoader( extension : String, class : String ) |
The AddLoader function makes a new loader available for
autoloading files from a package inventory. Files with the specified
extension will be loaded by the specified Java
class. This function expects the specified class
to be an instance of a MillScript Loader
org.millscript.millscript.loaders.Loader. e.g.
AddLoader( "ms", "org.millscript.millscript.loaders.MillScriptLoader" )
| Syntax: | CronEmailList( emaillist : String ) |
The CronEmailList function sets the email
addresses that messages will be sent to during automated script
runs(using the auto command). e.g.
CronEmailList( "user@some.host.com, another.user@some.other.org" )
| Syntax: | DatabaseLockfile( file : String ) |
The DatabaseLockfile function sets the file
to be used as a database lockfile. file can contain the
variable ${DATABASENAME}, which will be replaced by the
name of the database being accessed. If the file exists, the relevant
database is assumed to be valid. e.g.
DatabaseLockfile( "/tmp/${DATABASENAME}" )
| Syntax: | JavaOptions( options : String ) |
The JavaOptions function defines options for
the Java interpreter. e.g.
JavaOptions( "-Xss256k -Xmx512m" )
| Syntax: | LogLevel( level : String ) |
Sets the logging level, controlling the verbosity of the messages produced by MillScript.
| Level | Description | Example |
|---|---|---|
| emerg | ||
| alert | ||
| crit | ||
| error | ||
| warn | ||
| notice | ||
| info | Informational messges | About to render ... |
| debug | Debugging messages | Java stack traces displayed when mishaps occur |
e.g.
LogLevel( "info" )
| Syntax: | ShowExpr( state : boolean ) |
The ShowExpr function, when set to true causes
MillScript to display the expression tree after parsing. e.g.
ShowExpr( true )
| Syntax: | Version( version : String ) |
The Version function sets the specific version of
MillScript you want to use. You can set a general default in the
global configuration file and a specific version for an individual
website. e.g.
Version( "9.8.1" )