static void delete(
DB_Connection
$dbc, integer
$id, [string
$table_name = 'registry']
)
|
|
Deletes a key specified by it's ID
Parameters:
|
DB_Connection |
$dbc: |
|
|
integer |
$id: |
Key ID |
|
string |
$table_name: |
Table name of registry |
API Tags:
static void delete_key_and_children_with_id(
DB_Connection
$dbc, integer
$id, [string
$table_name = 'registry']
)
|
|
Deletes key (specified with ID) and it's children
Parameters:
|
DB_Connection |
$dbc: |
|
|
integer |
$id: |
ID of the key |
|
string |
$table_name: |
Table name of registry |
API Tags:
static void delete_key_and_children_with_path(
DB_Connection
$dbc, string
$full_path, [string
$table_name = 'registry']
)
|
|
Deletes key (specified with full path) and it's children
Parameters:
|
DB_Connection |
$dbc: |
|
|
string |
$full_path: |
Full path of the key |
|
string |
$table_name: |
Table name of registry |
API Tags:
static array get_child_keys_by_full_path(
DB_Connection
$dbc, string
$key_full_path, [
$table_name = 'registry'], string
$able_name
)
|
|
Returns child keys of key specified by full path
Parameters:
|
DB_Connection |
$dbc: |
|
|
string |
$key_full_path: |
Full path of the key |
|
string |
$able_name: |
Table name of registry |
|
|
$table_name: |
|
API Tags:
static array get_child_keys_by_id(
DB_Connection
$dbc, integer
$parent_id, [string
$table_name = 'registry']
)
|
|
Returns child kes of a key specified by ID
Parameters:
|
DB_Connection |
$dbc: |
|
|
integer |
$parent_id: |
Key ID |
|
string |
$table_name: |
Table name of registry |
API Tags:
static boolena key_exists(
DB_Connection
$dbc, string
$full_path, [string
$table_name = 'registry']
)
|
|
Checks if key exists
Parameters:
|
DB_Connection |
$dbc: |
|
|
string |
$full_path: |
Full path to the key |
|
string |
$table_name: |
Table name of the registry |
API Tags:
| Return: | Returns true if key exist, false otherwise |
| Access: | public |
Information Tags:
| Throws: | TE_Registry_Invalid_Path |
static array _get_child_keys_by_id(
DB_Connection
$dbc, unknown_type
$parent_id, [string
$table_name = 'registry']
)
|
|
Returns child kes of a key specified by ID
Parameters:
|
DB_Connection |
$dbc: |
|
|
unknown_type |
$parent_id: |
Key ID |
|
string |
$table_name: |
Table name of registry |
API Tags:
| Internal: | |
| Access: | private |
Registry_Key_DB __construct(
[string
$table_name = 'registry']
)
|
|
Constructor
Parameters:
|
string |
$table_name: |
DB table name for the registry table |
Returns full path of the current key
Parameters:
API Tags:
Returns parent key ID
API Tags:
Returns table name
API Tags:
Inserts the key into DB
Parameters:
API Tags:
| Return: | ID of the key. If unsuccessful - returns false |
| Internal: | |
| Access: | protected |
Information Tags:
integer load_by_full_path(
DB_Connection
$dbc, string
$full_path
)
|
|
Loads key by full path
Parameters:
API Tags:
| Return: | Returns key ID on success, false otherwise |
| Access: | public |
Loads key by ID
Parameters:
API Tags:
| Return: | Returns ID on success, false otherwise |
| Access: | public |
Implementation of:
- I_DB_Storable::load_by_id()
- Loads the object from DB
integer load_by_parent_and_key_name(
DB_Connection
$dbc, integer
$parent, string
$key_name
)
|
|
Loads key by parent and key name
Parameters:
|
DB_Connection |
$dbc: |
|
|
integer |
$parent: |
ID of the parent |
|
string |
$key_name: |
Name of the key |
API Tags:
| Return: | Returns key ID on success, false otherwise |
| Access: | public |
Saves the key in DB
Parameters:
API Tags:
| Return: | ID of the key on success, false otherwise |
| Access: | public |
Implementation of:
- I_DB_Storable::save()
- Save the object in DB
Saves the key in DB. Alias of $this->save()
Parameters:
API Tags:
void set_id(
intger
$id
)
|
|
Sets ID
Parameters:
API Tags:
void set_parent(
integer
$parent
)
|
|
Sets parent ID
Parameters:
API Tags:
void set_table_name(
string
$table_name
)
|
|
Sets table name
Parameters:
API Tags:
Information Tags:
| Throws: | Tangra_Module_Exception |
Updates the key data into DB
Parameters:
API Tags:
| Return: | ID of the key |
| Access: | protected |
Returns array with full path of the current key
Parameters:
API Tags:
| Internal: | |
| Access: | private |