Documentation

pm_Settings
in package

Manager of module settings

Tags
since
11.0

Table of Contents

clean()  : void
Delete all settings
get()  : string|null
Retrieve value of setting by given name
getDecrypted()  : string|null
Retrieve value of setting by given name with decryption (AES-128 CBC)
set()  : void
Store value of setting Value length is limited to - 5000 characters (since Plesk 17.8) - 2000 characters (prior to Plesk 17.8)
setEncrypted()  : void
Store value of setting in encrypted form (AES-128 CBC)

Methods

clean()

Delete all settings

public static clean([string $prefix = '' ]) : void
Parameters
$prefix : string = ''

Settings name prefix

Tags
since
12.5
since
17.0

added argument $prefix

Return values
void

get()

Retrieve value of setting by given name

public static get(string $name[, string|null $default = null ]) : string|null
Parameters
$name : string

Setting name

$default : string|null = null

Default value of setting

Return values
string|null

getDecrypted()

Retrieve value of setting by given name with decryption (AES-128 CBC)

public static getDecrypted(string $name[, string|null $default = null ]) : string|null
Parameters
$name : string

Setting name

$default : string|null = null

Default value of setting

Tags
since
17.8
Return values
string|null

set()

Store value of setting Value length is limited to - 5000 characters (since Plesk 17.8) - 2000 characters (prior to Plesk 17.8)

public static set(string $name, string|null $value) : void
Parameters
$name : string

Setting name

$value : string|null

Setting value or null to delete setting

Tags
throws
Zend_Db_Table_Exception
throws
Zend_Db_Table_Row_Exception
throws
pm_Exception_InvalidArgumentException
Return values
void

setEncrypted()

Store value of setting in encrypted form (AES-128 CBC)

public static setEncrypted(string $name, string|null $value) : void
Parameters
$name : string

Setting name

$value : string|null

Setting value or null to delete setting

Tags
since
17.8
Return values
void

Search results