Lue dans les fichiers PHP du paquet au commit ffd8bdb8740d : 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é.
DonkiSourceclassNASA's DONKI, the Database Of Notifications, Knowledge, Information of the Community Coordinated Modeling Center (NASA Goddard): space weather events - solar flares, coronal mass ejections, geomagnetic storms, interplanetary shocks, solar energetic particle events, magnetopause crossings, radiation belt enhancements, high speed streams - one by its activity id (entity()), or every event of some kinds in a period (events(), outside the contract), each with its time, its note, the instruments that saw it and the events it is linked to.
5 methods · 2 constants
DonkiSourceFactoryclassNASA's DONKI: space weather events (solar flares, coronal mass ejections, geomagnetic storms...) by activity id or by period - no key needed.
2 options
Omnilab\Donki
DonkiSource class
final class DonkiSource extends HttpSource DonkiSource.php:37
NASA's DONKI, the Database Of Notifications, Knowledge, Information of the Community Coordinated Modeling Center (NASA Goddard): space weather events - solar flares, coronal mass ejections, geomagnetic storms, interplanetary shocks, solar energetic particle events, magnetopause crossings, radiation belt enhancements, high speed streams - one by its activity id (entity()), or every event of some kinds in a period (events(), outside the contract), each with its time, its note, the instruments that saw it and the events it is linked to.
Why not occurrences(): an occurrence has a place on the Earth (a Point), and these happen on the Sun (a flare's source is a heliographic location, S20W62), in the heliosphere (a CME, a shock at L1) or around the whole Earth (a storm's Kp is planetary): none has a place the core reads.
No key: since 30 September 2026 the CCMC serves DONKI's API at ccmc.gsfc.nasa.gov/DONKI-API (api.nasa.gov/DONKI, which took the DEMO_KEY, and kauai.ccmc.gsfc.nasa.gov answer 301 to a news page).
const BASE_URI = 'https://ccmc.gsfc.nasa.gov/DONKI-API/get/'const KINDS = ['FLR' => ['flrID', 'beginTime', 'solar flare'], 'CME' => ['activityID', 'startTime', 'coronal mass ejection'], 'GST' => ['gstID', 'startTime', 'geomagnetic …The kinds of event: DONKI's code => [the id's field, the time's field, the word].
DonkiSource::__construct()
public function __construct(HttpClientInterface $http, string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.0)DonkiSource::getName()
public function getName(): stringDonkiSource::capabilities()
public function capabilities(): arrayDonkiSource::entity()
public function entity(Identifier|string $id): ?EntityAn event by its activity id (2026-10-04T06:13:00-FLR-001, donki:..., an Identifier of the donki scheme): one call, its kind's list on the day the id starts with. Null when that day has no such event; another identifier is refused before any call.
DonkiSource::events()
public function events(\DateTimeInterface $from, \DateTimeInterface $to, array $kinds = []): PageThe events of some kinds (DonkiSource::KINDS: FLR, CME, GST... all when none is named) whose time falls in the period, the earliest first, as one page (DONKI pages nothing; one call per kind). Outside the contract: see the class.
DonkiSourceFactory class
final class DonkiSourceFactory extends SourceFactory DonkiSourceFactory.php:20
NASA's DONKI: space weather events (solar flares, coronal mass ejections, geomagnetic storms...) by activity id or by period - no key needed.
options: mailto: 'support@glitchr.io' # in the User-Agent throttle: 0 # seconds between two calls: the CCMC publishes no rate base_uri: 'https://ccmc.gsfc.nasa.gov/DONKI-API/get/'
Options
| Option | Default | |
|---|---|---|
throttle | 0.0 | |
base_uri | DonkiSource::BASE_URI |