All pastes #947369 Raw Edit

Someone

public text v1 · immutable
·published 2008-03-18 13:27 UTC
rendered paste body
    private function init($yaml) {
        // read cache
        if (! $this->readCache()) {
            $cfg = Spyc::YAMLLoad($yaml);
            if (!isset($cfg[$this->env])) {
                $this->env = self::$DEFAULT_ENV;
            }
            $this->configArray = $cfg[$this->env];

            $this->replaceAllConsts($this->configArray);
        }
    }