Methods summary
public
|
|
public
string
|
#
get_setting( string $name )
Get setting value from database.
Get setting value from database.
This method returns a system setting from the database.
Parameters
- $name
string $name The database setting name.
Returns
string Returns the database value for the selected setting.
ExpectedException
Exception
|
public
integer
|
#
set_setting( string $name, type $value )
This method sets the value for a specific setting on the database. If the
setting doesn't exist, it is going to be created, otherwise updated.
This method sets the value for a specific setting on the database. If the
setting doesn't exist, it is going to be created, otherwise updated.
Parameters
- $name
string $name The setting name.
- $value
type $value The setting value.
Returns
integer Returns the setting database id.
ExpectedException
Exception
|
public
boolean
|
#
remove_setting( string $name )
Remove a setting from the database.
Remove a setting from the database.
Parameters
- $name
string $name The setting name to be removed.
Returns
boolean Returns the delete operation result.
ExpectedException
Exception
|
public
boolean
|
#
save_settings( array $settings )
Saves all the system settings into the database.
Saves all the system settings into the database.
This method is usefull when trying to save all the system settings at once
instead of saving them one by one.
Parameters
- $settings
array $settings Contains all the system settings.
Returns
boolean Returns the save operation result.
Throws
Exception
When the update operation won't work for a specific setting.
|
public
array
|
#
get_settings( )
Returns all the system settings at once.
Returns all the system settings at once.
Returns
array Array of all the system settings stored in the 'ea_settings' table.
|