function tripal_db_get_dbxref_by_accession
2.x tripal_db.DEPRECATED.inc | tripal_db_get_dbxref_by_accession($accession, $db_id = 0) |
3.x tripal_db.DEPRECATED.inc | tripal_db_get_dbxref_by_accession($accession, $db_id = 0) |
1.x tripal_db.api.inc | tripal_db_get_dbxref_by_accession($accession, $db_id = 0) |
Deprecated
Restructured API to make naming more readable and consistent. Function was deprecated in Tripal 2.0 and will be removed 2 releases from now. This function has been replaced by tripal_get_db().
See also
File
- tripal_db/
api/ tripal_db.DEPRECATED.inc, line 124 - Wrapper functions to provide backwards compatibility for the tripal db api
Code
function tripal_db_get_dbxref_by_accession($accession, $db_id = 0) {
tripal_report_error(
'tripal_deprecated',
TRIPAL_NOTICE,
"DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
array(
'%old_function' => 'tripal_db_get_dbxref_by_accession',
'%new_function' => 'tripal_get_dbxref'
)
);
$identifiers = array(
'accession' => $accession
);
if ($db_id > 0) {
$identifiers['db'] = array(
'db_id' => $db_id
);
}
return tripal_get_dbxref($identifiers);
}