public function __construct()
 {
     parent::__construct();
     $this->scanlog = new Logger('scanlog');
     $logname = core_config('logs.path') . DS . 'health_check.log';
     $this->scanlog->pushHandler(new StreamHandler($logname, Logger::DEBUG));
     $this->config = \Symfony\Component\Yaml\Yaml::parse(file_get_contents(core_config_path() . '/core.yaml'));
     print_r($this->config);
 }
Exemple #2
0
 public function set($key, $val, $save = false)
 {
     print __CLASS__ . '::' . __FUNCTION__ . ': ' . $key . ' ' . $val . ' ' . $save . "\n";
     static::$config[$key] = $val;
     if ($save) {
         $yaml = Yaml::dump(static::$config);
         $fp = core_config_path() . '/api.yaml';
         file_put_contents($fp, $yaml);
     }
 }