« Back to Product

Documentation

IPS_GetOption

 mixed IPS_GetOption (string $Option) 

Parameters

Option

Name of the option, e.g. "ThreadCount"

Returns

Stored value of the option. The data type (bool, int, float or string) matches the type of the option.

Description

Warning

This function is intended for internal use only and may change or be removed at any time without notice.

The function returns the value of the special switch Option. An overview of all available options is returned by IPS_GetOptionList.

The value stored in the settings is returned. If the option was changed with IPS_SetOption, this already is the new value, even if it only takes effect after a restart of IP-Symcon. The value currently in effect and the default value are returned by IPS_GetOptionEx.

If the option does not exist, the function fails with "Cannot find option ... node in settings".

Example

echo IPS_GetOption("ThreadCount"); // e.g. returns 50

var_dump(IPS_GetOption("ScriptWatch"));

/* e.g. returns:
bool(true)
*/
Any questions?