public function setData(string $table, $data){
            
            $file = $this->base . '/' . $table . '.json';
            if(file_exists($file)){
                if(file_put_contents($file, json_encode($data))){
                    $status = true;
                }else{
                    $status = false;
                }
                return new \NonDB\Components\Status($status);
            }else{
                throw new \NonDB\Exceptions\DriverException('Table Not Exists.', 1002);
            }

        }
public function setData(string $table, $data){
            
            $file = $this->base . '/' . $table . '.json';
            if(file_exists($file)){
                if(file_put_contents($file, json_encode($data))){
                    $status = true;
                }else{
                    $status = false;
                }
                return new \NonDB\Components\Status($status);
            }else{
                throw new \NonDB\Exceptions\DriverException('Table Not Exists.', 1002);
            }

        }
public function setData ( string $ table , $ data ) { $ file = $ this -> base . '/' . $ table . '.json' ; if ( file_exists ( $ file ) ) { if ( file_put_contents ( $ file , json_encode ( $ data ) ) ) { $ status = true ; } else { $ status = false ; } return new \ NonDB \ Components \ Status ( $ status ) ; } else { throw new \ NonDB \ Exceptions \ DriverException ( 'Table Not Exists.' , 1002 ) ; } }
Set a table's data

@param string $table
@param mixed[] $data
@throws \NonDB\Exceptions\DriverException

@return \NonDB\Components\Status
Set a table s data