public function loadMotifConfig(string $name) : self
{
$state = State::instance();
if (isset($state->motifs[$name])) {
try {
if (\file_exists(ROOT . '/config/motifs/' . $name . '.json')) {
$state->motif_config = \Airship\loadJSON(ROOT . '/config/motifs/' . $name . '.json');
} else {
$state->motif_config = [];
}
} catch (\Throwable $ex) {
$state->motif_config = [];
}
}
return $this;
}