Fork me on GitHub


The behavior of the Jaxon library can be changed using its configuration options.

The $jaxon->setOption($name, $value) function allows to set the value of a configuration option, while the $jaxon->getOption($name) function allows to read its value.

Configuration files

It is also possible to load the library configuration from a file, which can be in JSON, YAML, or PHP formats.

// Read configuration in a file based on its extension.

This function can take a second parameter to read the configuration only in a section of the file.

The configuration option list

These options are those of the Jaxon library. The Jaxon plugins can require additional options.

Name Type Description
core.version string The version number of the library
core.language string The language of the library
core.encoding string The character encoding to use
core.decode_utf8 boolean Whether to decode UTF8 Jaxon function parameters
core.prefix.function string The prefix to add to the names of exported javascript functions
core.prefix.class string The prefix to add to the names of the exported javascript classes
core.request.uri string The URL where all Jaxon requests are sent
core.request.mode string The query mode. Can be "asynchronous" or "synchronous"
core.request.method string The query method. Can be "POST" or "GET"
core.request.csrf_meta string The name of the HTML meta header for the CSRF token
core.process.clean boolean Whether to clean the buffer after the processing of a request
core.process.exit boolean Whether to call the exit() function after the processing of a request
core.process.timeout integer
core.error.handle boolean Whether to handle error
core.error.log_file string The path of the error log file
core.debug.on boolean Whether to enable debug mode
core.debug.verbose boolean Whether to enable verbose debug mode
core.debug.output_id string The id of the javascript debug output
js.lib.uri string The link to the Jaxon javascript libraries
js.lib.queue_size integer The max number of commands in a single answer
js.lib.show_cursor boolean Whether to display a cursor
js.lib.show_status boolean Whether to display the status of the request string The link to the javascript files generated by Jaxon string The directory that contains the javascript files generated by Jaxon string The name of the javascript file, without the extension boolean Whether to create a javascript file containing the code generated by Jaxon boolean Whether to minify the file generated by Jaxon string The options to add to the javascript tag in the generated HTML code