Lue dans les fichiers PHP du paquet au commit 9bf4fb209674 : 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é.
WormsSourceclassWoRMS, the World Register of Marine Species (VLIZ), through its REST service (www.marinespecies.org/rest): a taxon by its AphiaID, its name, or the ITIS TSN, NCBI taxon or IUCN id WoRMS knows it by - its accepted name and status, its classification, its synonyms, its vernacular names, WoRMS's habitat flags and the citation it asks for; its ITIS, NCBI and IUCN ids as cross-references; its parent, its accepted name and its synonyms as related things. A search of names, 50 a page.
5 methods · 3 constants
WormsSourceFactoryclassWoRMS: marine taxa by AphiaID, name or an ITIS, NCBI or IUCN id, with their classification, synonyms, vernacular names and cross-references - no key needed.
8 options
Omnilab\Worms
WormsSource class
final class WormsSource extends HttpSource WormsSource.php:33
WoRMS, the World Register of Marine Species (VLIZ), through its REST service (www.marinespecies.org/rest): a taxon by its AphiaID, its name, or the ITIS TSN, NCBI taxon or IUCN id WoRMS knows it by - its accepted name and status, its classification, its synonyms, its vernacular names, WoRMS's habitat flags and the citation it asks for; its ITIS, NCBI and IUCN ids as cross-references; its parent, its accepted name and its synonyms as related things. A search of names, 50 a page.
No key, no published rate; each call takes one to three seconds, and a taxon read whole takes up to seven (the record, its classification, synonyms, vernaculars, and one call per external id): the options leave out what is not needed.
const BASE_URI = 'https://www.marinespecies.org/rest/'const MAX_PER_PAGE = 50WoRMS's page: 50 records.
const EXTERNAL_IDS = ['tsn' => Scheme::ITIS, 'ncbi' => Scheme::NCBI_TAXON, 'iucn' => Scheme::IUCN]The external ids read by default, each a call: WoRMS's type => the core's scheme.
WormsSource::__construct()
public function __construct(HttpClientInterface $http, readonly bool $classification = true, readonly bool $synonyms = true, readonly bool $vernaculars = true, readonly array $externalIds = ['tsn', 'ncbi', 'iucn'], readonly ?string $language = 'eng', readonly bool $marineOnly = false, string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.0)$externalIdsthe external ids read (tsn, ncbi, iucn), one call each
$languagethe vernacular names kept, by ISO 639-3 code (eng, fra...); null: all
WormsSource::getName()
public function getName(): stringWormsSource::capabilities()
public function capabilities(): arrayWormsSource::entity()
public function entity(Identifier|string $id): ?EntityA taxon by its AphiaID (137094, worms:137094, its LSID, its page), by an ITIS TSN, an NCBI taxon or an IUCN id WoRMS holds (an Identifier, itis:180438), or by its exact scientific name (the accepted usage first when the name has several): the record as WoRMS keeps it - an unaccepted name is itself, its accepted name related -, then what the options ask for.
WormsSource::search()
public function search(Query $query): PageWoRMS's names that begin with the text (like=true), accepted or not, in WoRMS's order, page by offset (50 a page at most); the total is not known. A domain other than taxonomy answers nothing.
WormsSourceFactory class
final class WormsSourceFactory extends SourceFactory WormsSourceFactory.php:26
WoRMS: marine taxa by AphiaID, name or an ITIS, NCBI or IUCN id, with their classification, synonyms, vernacular names and cross-references - no key needed.
options: mailto: 'support@glitchr.io' # in the User-Agent classification: true # the lineage (a call) synonyms: true # the synonyms (a call) vernaculars: true # the vernacular names (a call) external_ids: [tsn, ncbi, iucn] # the cross-references read, a call each language: eng # the vernacular names kept (ISO 639-3); null: all marine_only: false # names and searches among marine taxa only throttle: 0 # seconds between two calls: WoRMS publishes no rate base_uri: 'https://www.marinespecies.org/rest/'
Options
| Option | Default | |
|---|---|---|
classification | true | |
synonyms | true | |
vernaculars | true | |
external_ids | ['tsn', 'ncbi', 'iucn'] | |
language | 'eng' | |
marine_only | false | |
throttle | 0.0 | |
base_uri | WormsSource::BASE_URI |