From f7c87ed3dd29884445a760cbe57404e139c76407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 5 Mar 2020 10:41:31 +0100 Subject: ConfigFile: Improve error messages and complete docs --- doc/classes/ConfigFile.xml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index 00d98130f3..a16326d55a 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -37,7 +37,7 @@ - Deletes the specified section along with all the key-value pairs inside. + Deletes the specified section along with all the key-value pairs inside. Raises an error if the section does not exist. @@ -48,6 +48,7 @@ + Deletes the specified key in a section. Raises an error if either the section or the key do not exist. @@ -56,7 +57,7 @@ - Returns an array of all defined key identifiers in the specified section. + Returns an array of all defined key identifiers in the specified section. Raises an error and returns an empty array if the section does not exist. @@ -76,7 +77,7 @@ - Returns the current value for the specified section and key. If the section and/or the key do not exist, the method returns the value of the optional [code]default[/code] argument, or [code]null[/code] if it is omitted. + Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback [code]default[/code] value. If [code]default[/code] is not specified or set to [code]null[/code], an error is also raised. @@ -105,7 +106,7 @@ - Loads the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object which the method was called on. + Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. Returns one of the [enum Error] code constants ([code]OK[/code] on success). @@ -117,6 +118,8 @@ + Loads the encrypted config file specified as a parameter, using the provided [code]key[/code] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. + Returns one of the [enum Error] code constants ([code]OK[/code] on success). @@ -124,9 +127,11 @@ - + + Loads the encrypted config file specified as a parameter, using the provided [code]password[/code] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. + Returns one of the [enum Error] code constants ([code]OK[/code] on success). @@ -145,7 +150,7 @@ - Saves the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure. + Saves the contents of the [ConfigFile] object to the file specified as a parameter. The output file uses an INI-style structure. Returns one of the [enum Error] code constants ([code]OK[/code] on success). @@ -157,6 +162,8 @@ + Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [code]key[/code] to encrypt it. The output file uses an INI-style structure. + Returns one of the [enum Error] code constants ([code]OK[/code] on success). @@ -164,9 +171,11 @@ - + + Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [code]password[/code] to encrypt it. The output file uses an INI-style structure. + Returns one of the [enum Error] code constants ([code]OK[/code] on success). @@ -179,7 +188,7 @@ - Assigns a value to the specified key of the specified section. If the section and/or the key do not exist, they are created. Passing a [code]null[/code] value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed. + Assigns a value to the specified key of the specified section. If either the section or the key do not exist, they are created. Passing a [code]null[/code] value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed. -- cgit v1.2.3