public function saveTable($table, array &$data)
    {
        $file = $this->path . '/' . $table . '.json';
        $data = $this->touchModified($data);

        $opt  = is_numeric($this->opt['json_options'])
            ? $this->opt['json_options']
            : 0;

        $dept = is_numeric($this->opt['json_depth'])
            ? $this->opt['json_depth']
            : 512;

        return file_put_contents($file, json_encode($data, $opt, $dept), LOCK_EX) > 0;
    }
public function saveTable($table, array &$data)
    {
        $file = $this->path . '/' . $table . '.json';
        $data = $this->touchModified($data);

        $opt  = is_numeric($this->opt['json_options'])
            ? $this->opt['json_options']
            : 0;

        $dept = is_numeric($this->opt['json_depth'])
            ? $this->opt['json_depth']
            : 512;

        return file_put_contents($file, json_encode($data, $opt, $dept), LOCK_EX) > 0;
    }
public function saveTable ( $ table , array & $ data ) { $ file = $ this -> path . '/' . $ table . '.json' ; $ data = $ this -> touchModified ( $ data ) ; $ opt = is_numeric ( $ this -> opt [ 'json_options' ] ) ? $ this -> opt [ 'json_options' ] : 0 ; $ dept = is_numeric ( $ this -> opt [ 'json_depth' ] ) ? $ this -> opt [ 'json_depth' ] : 512 ; return file_put_contents ( $ file , json_encode ( $ data , $ opt , $ dept ) , LOCK_EX ) > 0 ; }
Save table data

@param  string $table
@param  array  $data
@return boolean
Save table data