Airship\Engine\Lens::loadMotifConfig PHP 메소드

loadMotifConfig() 공개 메소드

Load the config for this motif
public loadMotifConfig ( string $name ) : self
$name string
리턴 self
    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;
    }