\OCPConfig

This class provides functions to read and write configuration data.

configuration can be on a system, application or user level

Summary

Methods
Properties
Constants
getSystemValue()
setSystemValue()
deleteSystemValue()
getAppValue()
setAppValue()
getUserValue()
setUserValue()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getSystemValue()

getSystemValue(string  $key, mixed  $default = null) : mixed

Gets a value from config.php

Parameters

string $key

key

mixed $default

= null default value

Returns

mixed —

the value or $default

setSystemValue()

setSystemValue(string  $key, mixed  $value) : boolean

Sets a value

Parameters

string $key

key

mixed $value

value

Returns

boolean

deleteSystemValue()

deleteSystemValue(string  $key) 

Deletes a value from config.php

Parameters

string $key

key

getAppValue()

getAppValue(string  $app, string  $key, string  $default = null) : string

Gets the config value

Parameters

string $app

app

string $key

key

string $default

= null, default value if the key does not exist

Returns

string —

the value or $default

setAppValue()

setAppValue(string  $app, string  $key, string  $value) : boolean

Sets a value in the appconfig

Parameters

string $app

app

string $key

key

string $value

value

Returns

boolean —

true/false

getUserValue()

getUserValue(string  $user, string  $app, string  $key, string  $default = null) : string

Gets the preference

Parameters

string $user

user

string $app

app

string $key

key

string $default

= null, default value if the key does not exist

Returns

string —

the value or $default

setUserValue()

setUserValue(string  $user, string  $app, string  $key, string  $value) : boolean

Sets a value in the preferences

Parameters

string $user

user

string $app

app

string $key

key

string $value

value

Returns

boolean