Registry_DB __construct(
DB_Connection
$dbc, [string
$table_name = 'registry']
)
|
|
Constructor
Parameters:
|
DB_Connection |
$dbc: |
|
|
string |
$table_name: |
Table name for the registry db table |
void create_key_with_parent_id(
integer
$parent_id, string
$key_name, integer
$type, mixed
$value
)
|
|
Creates key with parent ID given
Parameters:
|
integer |
$parent_id: |
ID of the parent |
|
string |
$key_name: |
Name of the key |
|
integer |
$type: |
Type of the key (@see Registry_Key_DB for constants) |
|
mixed |
$value: |
Value of the key |
API Tags:
integer create_key_w_path(
string
$key_full_path, integer
$type, mixed
$value, [
$forgiving = true]
)
|
|
Creates key with full path given
Parameters:
|
string |
$key_full_path: |
Full path of the key (Please note that path must NOT end with slash (/)) |
|
integer |
$type: |
Type of the key (@see Registry_Key_DB for constants) |
|
mixed |
$value: |
Value of the key |
|
|
$forgiving: |
|
API Tags:
| Return: | On success returns the ID of the key. On failure - return false |
| Access: | public |
Redefinition of:
- Registry::create_key_w_path()
- Create key with given full path
Returns db connection
API Tags:
mixed get_key_value(
string
$key_full_path, [boolean
$forgiving = false]
)
|
|
Returns value of the key
Parameters:
|
string |
$key_full_path: |
Full path of the key |
|
boolean |
$forgiving: |
If false and key does not exist will throw excepion. If $forgiving = true and key not exists will return false |
API Tags:
Information Tags:
| Throws: | TE_Registry_Key_Not_Exists |
Redefinition of:
- Registry::get_key_value()
- Returns key value
Returns table name for the registry db table
API Tags:
Saves key in DB
Parameters:
API Tags:
| Internal: | |
| Access: | protected |
void set_key_value(
string
$key_full_path, mixed
$value
)
|
|
Sets value of a key.
Parameters:
|
string |
$key_full_path: |
Full path of the key |
|
mixed |
$value: |
New value |
API Tags:
Redefinition of:
- Registry::set_key_value()
- Sets key value
void set_table_name(
string
$table_name
)
|
|
Sets table name for the registry db table
Parameters:
API Tags: