<commit_before><?php
/**
 * Created by PhpStorm.
 * User: macbookpro
 * Date: 09/01/18
 * Time: 16:33
 */

namespace Ballybran\Database;

use PDO;

class Backup extends DBconnection
{

    private $tables = array();
    private $conn;

    public function __construct($params)
    {
        parent::__construct($params);

        $this->conn = $this->connection();
    }



//put table names you want backed up in this array.
//leave empty to do all


    function backup_tables($file, $compress = false, $tables = null)
    {

        $this->conn->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_TO_STRING);

//Script Variables
        $compression = $compress;
        $BACKUP_PATH = $file;


//create/open files
        if ($compression) {
            $zp = gzopen($BACKUP_PATH . '', "w9");
        } else {
            $handle = fopen($BACKUP_PATH, 'a+');
        }<commit_msg>Update Backup.php<commit_after><?php
/**
 * Created by PhpStorm.
 * User: macbookpro
 * Date: 09/01/18
 * Time: 16:33
 */

namespace Ballybran\Database;

use PDO;

class Backup extends DBconnection
{

    private $tables = array();
    private $conn;

    public function __construct($params)
    {
        parent::__construct($params);

        $this->conn = $this->connection();
    }



//put table names you want backed up in this array.
//leave empty to do all


    public function backup_tables($file, $compress = false, $tables = null)
    {

        $this->conn->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_TO_STRING);

//Script Variables
        $compression = $compress;
        $BACKUP_PATH = $file;


//create/open files
        if ($compression) {
            $zp = gzopen($BACKUP_PATH . '', "w9");
        } else {
            $handle = fopen($BACKUP_PATH, 'a+');
        }
{'fraction_non_alphanumeric': 0.13946922642574816, 'fraction_numerical': 0.012422360248447204, 'mean_word_length': 2.5298804780876494, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3810441', 'n_tokens_mistral': 598, 'n_tokens_neox': 566, 'n_words': 140}