dump() public method

Generates configuration in NEON format.
public dump ( array $data ) : string
$data array
return string
Example #1
0
 public function saveConfig()
 {
     $this->save();
     $values = $this->data;
     $this->loadConfig();
     $data =& $this->data;
     foreach ($this->root as $item) {
         $data =& $data[$item];
     }
     $data = $data ?: array();
     $data = Arrays::mergeTree($values, $data);
     file_put_contents($this->fileName, $this->adapter->dump($this->data));
     if (function_exists('opcache_reset')) {
         opcache_reset();
     }
 }
Example #2
0
 public function save()
 {
     file_put_contents($this->fileName, $this->adapter->dump((array) $this->data));
     $this->load();
 }