.TH "Eliom_config" 3o 2014-07-10 OCamldoc "" .SH NAME Eliom_config \- This module makes also possible get information from the configuration file. .SH Module Module Eliom_config .SH Documentation .sp Module .BI "Eliom_config" : .B sig end .sp This module makes also possible get information from the configuration file\&. .sp It make also possible to add configuration options in configuration file for your Eliom modules\&. Use .B Eliom_config\&.parse_config for that\&. .sp Example: .sp myvalue .sp .sp .sp .sp .I val get_default_hostname : .B unit -> string .sp The function .B get_default_hostname () returns the hostname declared in the config file ( .B ) or the default machine hostname\&. In that case, absolute URL will use that hostname\&. .sp .sp .I val get_default_port : .B unit -> int .sp The function .B get_default_port () returns the port number declared in the config file ( .B ) or 80 if undeclared\&. .sp .sp .I val get_default_sslport : .B unit -> int .sp The function .B get_default_sslport () returns the https port number declared in the config file ( .B ) or 443 if undeclared\&. .sp .sp .I val default_protocol_is_https : .B unit -> bool .sp The function .B default_protocol_is_https () returns .B true if there is option ( .B )or false otherwise\&. In that case, absolute links will use https protocol even if the current request is http\&. .sp .sp .I val get_config_default_charset : .B unit -> string .sp The function .B get_config_default_charset () returns the default charset for this site\&. .sp .sp .I val set_default_links_xhr : .B ?override_configfile:bool -> bool -> unit .sp The provided value serves as a default value for the optional parameter .B ~xhr in the functions .B Eliom_registration\&.*\&.{a, get_form, post_form, .B lwt_get_form, lwt_post_form} (cf\&. .B Eliom_registration\&.Html5\&.a et al\&.)\&. This value can also be set in the config file\&. .sp .sp .I val get_config : .B unit -> Simplexmlparser.xml list .sp The function .B get_config () returns the information of the configuration file concerning that site (between .B and .B or .B and .B )\&. .sp Warning: You must call that function during the initialisation of your module (not during a Lwt thread or a service) otherwise it will raise the exception .B Eliom_common\&.Eliom_site_information_not_available \&. If you want to build a statically linkable module, you must call this function inside the initialisation function given to .B Eliom_service\&.register_eliom_module \&. .sp .sp .I val parse_config : .B ?pcdata:(string -> unit) -> .B ?other_elements:(string -> .B (string * string) list -> Simplexmlparser.xml list -> unit) -> .B Ocsigen_extensions.Configuration.element list -> unit .sp Process the configuration (same as the one returned by ) by a given specification (cf\&. ) .sp .sp .I val get_config_info : .B unit -> Ocsigen_extensions.config_info .sp The function .B get_config_info () returns the information concerning the current request from the configuration files (must be called during a request)\&. The configuration may have been modified by previous Ocsigen server extensions\&. .sp .sp