Javascript ConfigSection

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
m
(Added doc for addValue())
 
(One intermediate revision by one user not shown)
Line 10: Line 10:
 
* '''getValue(key,defValue)'''
 
* '''getValue(key,defValue)'''
 
Retrieves the value of ''key'' in this section. Returns ''defValue'' if the key or section does not exist.
 
Retrieves the value of ''key'' in this section. Returns ''defValue'' if the key or section does not exist.
 +
 +
* '''getIntValue(key)'''
 +
Retrieves the integer value of ''key'' in this section. Returns 0 if the key or section does not exist.
 +
 +
* '''getIntValue(key,defValue)'''
 +
Retrieves the integer value of ''key'' in this section. Returns ''defValue'' if the key or section does not exist.
 +
 +
* '''getBoolValue(key)'''
 +
Retrieves the boolean value of ''key'' in this section. Returns ''false'' if the key or section does not exist.
 +
 +
* '''getBoolValue(key,defValue)'''
 +
Retrieves the boolean value of ''key'' in this section. Returns ''defValue'' if the key or section does not exist.
  
 
* '''setValue(key,value)'''
 
* '''setValue(key,value)'''
 
Sets the ''value'' for ''key'' in this file section.
 
Sets the ''value'' for ''key'' in this file section.
 +
 +
* '''addValue(key,value)'''
 +
Adds a new ''value'' for ''key'' in this file section.
  
 
* '''clearKey(key)'''
 
* '''clearKey(key)'''

Latest revision as of 16:11, 25 August 2015

Configuration File Section handling object.

[edit] Methods

  • configFile()

Returns the ConfigFile object holding this section.

  • getValue(key)

Retrieves the value of key in this section. Returns undefined if the key or section does not exist.

  • getValue(key,defValue)

Retrieves the value of key in this section. Returns defValue if the key or section does not exist.

  • getIntValue(key)

Retrieves the integer value of key in this section. Returns 0 if the key or section does not exist.

  • getIntValue(key,defValue)

Retrieves the integer value of key in this section. Returns defValue if the key or section does not exist.

  • getBoolValue(key)

Retrieves the boolean value of key in this section. Returns false if the key or section does not exist.

  • getBoolValue(key,defValue)

Retrieves the boolean value of key in this section. Returns defValue if the key or section does not exist.

  • setValue(key,value)

Sets the value for key in this file section.

  • addValue(key,value)

Adds a new value for key in this file section.

  • clearKey(key)

Deletes the key from this file section.

  • keys()

Returns a numbered (non-associative) Array containing all the key names in this section.

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers