N98\Magento\DbSettings::getMysqlClientToolConnectionString PHP Метод

getMysqlClientToolConnectionString() публичный Метод

    public function getMysqlClientToolConnectionString()
    {
        $segments = array();
        if (null !== $this->config['unix_socket']) {
            $segments[] = '--socket=' . escapeshellarg($this->config['unix_socket']);
        } else {
            $segments[] = '-h' . escapeshellarg($this->config['host']);
        }
        $segments[] = '-u' . escapeshellarg($this->config['username']);
        if (null !== $this->config['port']) {
            $segments[] = '-P' . escapeshellarg($this->config['port']);
        }
        if (strlen($this->config['password'])) {
            $segments[] = '-p' . escapeshellarg($this->config['password']);
        }
        $segments[] = escapeshellarg($this->config['dbname']);
        return implode(' ', $segments);
    }