DbPatch_Core_Db::enableOldConfigCompatibility PHP Метод

enableOldConfigCompatibility() защищенный Метод

This method provides backward compatibility for the 'bin_dir' configuration option. it could be removed in future versions. using bin_dir only is not sufficient because it limits the user to mysql/mysqldump. it's also not possible to use bin_dir and pass a Zend_Db_Adapter instance as configuration value.
protected enableOldConfigCompatibility ( ) : DbPatch_Core_Db
Результат DbPatch_Core_Db
    protected function enableOldConfigCompatibility()
    {
        $options = '-h{host} {%port%}-P{port} {%port%}-u{username} {%password%}-p{password} {%password%}--default-character-set={charset} {dbname}';
        if (!isset($this->config->dump_command)) {
            $dir = '';
            if (isset($this->config->db->bin_dir)) {
                $dir = $this->config->db->bin_dir . DIRECTORY_SEPARATOR;
            }
            $this->config->dump_command = "{$dir}mysqldump {$options} > {filename} 2>&1";
        }
        if (!isset($this->config->import_command)) {
            $dir = '';
            if (isset($this->config->db->bin_dir)) {
                $dir = $this->config->db->bin_dir . DIRECTORY_SEPARATOR;
            }
            $this->config->import_command = "{$dir}mysql {$options} < {filename} 2>&1";
        }
        return $this;
    }