Airship\Engine\Continuum::getMotifs PHP Method

getMotifs() public method

Get an array of GadgetUpdater objects
public getMotifs ( ) : array
return array
    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;
    }