Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need formatters and repositories to inherit some of the same stuff #98

Open
bradfordcondon opened this issue Dec 13, 2018 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@bradfordcondon
Copy link
Contributor

i just created a PR that adds teh below function to formatters

public function getNCBIDB(string $db_name) {
$name = "NCBI {$db_name}";
$db = db_query(
'SELECT * FROM chado.db WHERE UPPER(name) = :name',
[':name' => strtoupper($name)]
)->fetchObject();
if ($db) {
return $db;
}
$db = db_query(
'SELECT * FROM chado.db WHERE UPPER(name) = :name',
[':name' => strtoupper($db_name)]
)->fetchObject();
if ($db) {
return $db;
}
return FALSE;
}

its redundant with a function for repositories. we need to make a new class for shared stuff.

idea, should they both actually extend the same class?
Or perhaps each parent class extends a base class with the sahred stuff?

@bradfordcondon bradfordcondon added the enhancement New feature or request label Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant