Topics

Class Options

Website options storage

Namespace: Ip

Methods:

string getOption( string $key , [ null $defaultValue = null ] )

Get option value

Parameters:

string $key Option key
null $defaultValue A value to return if the option is not set

Return values:

string Option value

Throws:

Ip\Exception
string getOptionLang( string $key , string $languageCode , [ null $defaultValue = null ] )

Get language specific option value

Parameters:

string $key Option key
string $languageCode Language code
null $defaultValue A value to return if the option is not set

Return values:

string Option value

Throws:

Ip\Exception
setOption( string $key , mixed $value )

Set specific option

Parameters:

string $key Option key
mixed $value Option value

Throws:

Ip\Exception
setOptionLang( string $key , string $languageCode , mixed $value )

Set language specific option

Parameters:

string $key Option key
string $languageCode Language code
mixed $value Option value

Throws:

Ip\Exception
removeOption( string $key )

Remove option

Parameters:

string $key Option key

Throws:

Ip\Exception
removeOptionLang( string $key , integer $languageId )

Remove language specific option

Parameters:

string $key Option key
integer $languageId Language ID

Throws:

Ip\Exception
import( string $configFile )

Import options form JSON file

Parameters:

string $configFile File name to import

Throws:

Ip\Exception
array getAllOptions( )

Get all web site options

Return values:

array Configuration options
comments powered by Disqus