public function backup_migrate_item::decode_db_row in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.2 includes/crud.inc \backup_migrate_item::decode_db_row()
- 8.3 includes/crud.inc \backup_migrate_item::decode_db_row()
- 6.3 includes/crud.inc \backup_migrate_item::decode_db_row()
- 6.2 includes/crud.inc \backup_migrate_item::decode_db_row()
- 7.2 includes/crud.inc \backup_migrate_item::decode_db_row()
Decode a loaded db row (unserialize necessary fields).
1 call to backup_migrate_item::decode_db_row()
- backup_migrate_item::all_items in includes/
crud.inc - Get all of the given items.
File
- includes/
crud.inc, line 540 - CRUD functions for backup and migrate types (schedules, profiles etc.).
Class
- backup_migrate_item
- A base class for items which can be stored in the database.
Code
public function decode_db_row($data) {
$params = array();
$schema = $this
->get_schema();
// Load fields as specified in the schema.
foreach ($schema['fields'] as $field => $info) {
$params[$field] = empty($info['serialize']) ? $data[$field] : unserialize($data[$field]);
}
return $params;
}