public function getMotifs() : array
{
$motifs = [];
// First the universal gadgets:
foreach (\glob(ROOT . '/Motifs/*') as $supplierPath) {
if (!\is_dir($supplierPath)) {
continue;
}
$supplier = $this->getEndPiece($supplierPath);
foreach (\glob($supplierPath . '/*') as $motifDir) {
if ($motifDir === ROOT . '/Motifs/paragonie/airship-classic') {
continue;
}
$motifName = $this->getEndPiece($motifDir);
$manifest = \Airship\loadJSON($motifDir . '/motif.json');
$name = $supplier . '.' . $motifName;
$motifs[$name] = new MotifUpdater($this->hail, $manifest, $this->getSupplier($manifest['supplier']));
}
}
return $motifs;
}