Lue dans les fichiers PHP du paquet au commit b318dbabe7a0 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.
ChebiSourceclassChEBI, the EMBL-EBI's dictionary of chemical entities of biological interest, through the REST API of ChEBI 2.0 (www.ebi.ac.uk/chebi/backend/api): an entity by its ChEBI id (a secondary id gives its primary entry), an InChIKey, a CAS number, a KEGG id or a name; its definition, formula, masses, charge, structure (SMILES, InChI, InChIKey, an SVG depiction), its ontology - what it is a kind of, its roles, its functional parents, its conjugates - and its identifiers in other bases; a search by text.
5 methods · 2 constants
ChebiSourceFactoryclassChEBI: chemical entities of biological interest, their structure, their ontology (classes, roles) and cross-references - no key needed.
3 options
Omnilab\Chebi
ChebiSource class
final class ChebiSource extends HttpSource ChebiSource.php:32
ChEBI, the EMBL-EBI's dictionary of chemical entities of biological interest, through the REST API of ChEBI 2.0 (www.ebi.ac.uk/chebi/backend/api): an entity by its ChEBI id (a secondary id gives its primary entry), an InChIKey, a CAS number, a KEGG id or a name; its definition, formula, masses, charge, structure (SMILES, InChI, InChIKey, an SVG depiction), its ontology - what it is a kind of, its roles, its functional parents, its conjugates - and its identifiers in other bases; a search by text.
No key, no account. An entity by its ChEBI id costs one call; by anything else, a search first (two). The SOAP web service of ChEBI 1 is gone (its WSDL answers 500).
const BASE_URI = 'https://www.ebi.ac.uk/chebi/backend/api/public/'const MAX_PER_PAGE = 100The most entities one search page is asked for.
ChebiSource::__construct()
public function __construct(HttpClientInterface $http, readonly int $synonyms = 20, string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.0)$synonymshow many synonyms to keep (0: none)
ChebiSource::getName()
public function getName(): stringChebiSource::capabilities()
public function capabilities(): arrayChebiSource::entity()
public function entity(Identifier|string $id): ?EntityChebiSource::search()
public function search(Query $query): PageChEBI's own search (es_search): an exact match first when there is one, then the entries whose names, definition or identifiers hold the text; read from the search's documents - entity() reads the rest.
ChebiSourceFactory class
final class ChebiSourceFactory extends SourceFactory ChebiSourceFactory.php:20
ChEBI: chemical entities of biological interest, their structure, their ontology (classes, roles) and cross-references - no key needed.
options: mailto: 'support@glitchr.io' # in the User-Agent: whom the EBI writes to before it blocks a caller synonyms: 20 # how many synonyms to keep (0: none) throttle: 0 # seconds between two calls: the EBI publishes no figure for ChEBI base_uri: 'https://www.ebi.ac.uk/chebi/backend/api/public/'
Options
| Option | Default | |
|---|---|---|
synonyms | 20 | |
throttle | 0.0 | |
base_uri | ChebiSource::BASE_URI |