Short description of method getDSN

@access protected
@author Jerome Bogaerts, <jerome@taotesting.com>
@return string
972839
protected function getDSN()
    {
        
        $params = $this->getParams();
        $driver = str_replace('pdo_', '', $params['driver']);
        $dbName = $params['dbname'];
        $dbUrl = $params['host'];
        $dbPort = isset($params['port']) ? ';port='.$params['port'] : '';
        
        return $driver . ':dbname=' . $dbName . ';host=' . $dbUrl . $dbPort;
        
    }
1290393
function getSubjectDN($format = self::DN_ARRAY)
    {
        switch (true) {
            case !empty($this->dn):
                return $this->getDN($format);
            case !isset($this->currentCert) || !is_array($this->currentCert):
                break;
            case isset($this->currentCert['tbsCertificate']):
                return $this->getDN($format, $this->currentCert['tbsCertificate']['subject']);
            case isset($this->currentCert['certificationRequestInfo']):
                return $this->getDN($format, $this->currentCert['certificationRequestInfo']['subject']);
        }

        return false;
    }
644606
function getIssuerDN($format = self::DN_ARRAY)
    {
        switch (true) {
            case !isset($this->currentCert) || !is_array($this->currentCert):
                break;
            case isset($this->currentCert['tbsCertificate']):
                return $this->getDN($format, $this->currentCert['tbsCertificate']['issuer']);
            case isset($this->currentCert['tbsCertList']):
                return $this->getDN($format, $this->currentCert['tbsCertList']['issuer']);
        }

        return false;
    }
27656
public function getAnonymizeed()
	{
		$userinfo = $this->toObject();
		$userinfo->password_clear = '******';
		if (isset($userinfo->password)) {
			$userinfo->password = substr($userinfo->password, 0, 6) . '********';
		}
		if (isset($userinfo->password_salt)) {
			$userinfo->password_salt = substr($userinfo->password_salt, 0, 4) . '*****';
		}
		return $userinfo;
	}
793752
public function getDsn()
    {
        if ($this->checkParam()) {
            $dsn = 'pgsql:host=' . $this->getHost() . ';';
            if (!empty($this->getPort())) {
                $dsn .= 'port=' . $this->getPort() . ';';
            }
            if (!empty($this->getDatabase())) {
                $dsn .= 'dbname=' . $this->getDatabase() . ';';
            }
            return $dsn;
        } else {
            return false;
        }
    }
5253
public function getDsn()
    {
        if (!$this->config) {
            return '';
        }
        $dsn = array();
        $dbName = null;

        if ($this->config->getName()) {
            $dbName = $this->config->getName();
        }

        if ($this->config->getHost()) {
            if ($this->config->getPort()) {
                $dsn[] = sprintf('dbname=//%s:%s/%s',
                    $this->config->getHost(),
                    $this->config->getPort(),
                    $dbName
                );
            } else {
                $dsn[] = sprintf('dbname=//%s/%s',
                    $this->config->getHost(),
                    $dbName
                );
            }
        } else {
            $dsn[] = 'dbname='.$dbName;
        }

        if ($this->config->getChar()) {
            $dsn[] = 'charset='.$this->config->getChar();
        }

        return $this->getPrefix().implode(';', $dsn);
    }
206716
public function getDsn()
    {
        if ($this->checkParam()) {
            $sDsn = 'sqlite:';
            if ($this->getMemory() === true) {
                $sDsn .= ':memory:';
            } else {
                $sDsn .= $this->getDatabase();
            }
            return $sDsn;
        } else {
            return false;
        }
    }
1306412
protected function getDsn(array $config)
    {
        return $this->configHasSocket($config) ? $this->getSocketDsn($config) : $this->getHostDsn($config);
    }
628826
protected function _dsn()
    {
        // baseline of DSN parts
        $dsn = $this->_config;

        if (isset($dsn['host'])) {
            $tns = 'dbname=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)' .
                   '(HOST=' . $dsn['host'] . ')';

            if (isset($dsn['port'])) {
                $tns .= '(PORT=' . $dsn['port'] . ')';
            } else {
                $tns .= '(PORT=1521)';
            }

            $tns .= '))(CONNECT_DATA=(SID=' . $dsn['dbname'] . ')))';
        } else {
            $tns = 'dbname=' . $dsn['dbname'];
        }

        if (isset($dsn['charset'])) {
            $tns .= ';charset=' . $dsn['charset'];
        }

        return $this->_pdoType . ':' . $tns;
    }
330499
protected function getDSN(Array $config)
    {
        $dsn = "pgsql:host={$config['host']};dbname={$config['dbname']}";

        if (isset($config['port'])) {
            $dsn .= ";port={$config['port']}";
        }

        if (isset($config['sslmode'])) {
            $dsn .= ";sslmode={$config['sslmode']}";
        }

        return $dsn;
    }
1308408
public function getDsn()
    {
        if ($this->dsn) {
            return $this->dsn;
        }

        $dsn = $this->driver . ':';
        switch ($this->driver) {
            case 'mysql':
                $this->host && $dsn .= 'host=' . $this->host . ';';
                $this->port && $dsn .= 'port=' . $this->port . ';';
                $this->dbname && $dsn .= 'dbname=' . $this->dbname . ';';
                $this->unixSocket && $dsn .= 'unix_socket=' . $this->unixSocket . ';';
                $this->charset && $dsn .= 'charset=' . $this->charset;
                break;

            case 'sqlite':
                $dsn .= $this->path;
                break;

            case 'pgsql':
                $this->host && $dsn .= 'host=' . $this->host . ';';
                $this->port && $dsn .= 'port=' . $this->port . ';';
                $this->dbname && $dsn .= 'dbname=' . $this->dbname;
                break;

            default:
                throw new \RuntimeException(sprintf('Unsupported database driver: %s', $this->driver));
        }
        return $this->dsn = $dsn;
    }
999565
public static function getGlobalSessionId() {
		if(isset($_SERVER['PHPSESSID']))
			return $_SERVER['PHPSESSID'];
		elseif(isset($_POST['PHPSESSID']))
			return $_POST['PHPSESSID'];
		elseif(isset($_GET['PHPSESSID']))
			return $_GET['PHPSESSID'];
	}
637075
public function getEan() : ?string 
    {
        if ( ! $this->hasEan()) {
            $this->setEan($this->getDefaultEan());
        }
        return $this->ean;
    }
134141
protected function _dsn()
    {
        $this->_checkRequiredOptions($this->_config);

        // check if using full connection string
        if (array_key_exists('host', $this->_config)) {
            $dsn = ';DATABASE=' . $this->_config['dbname']
            . ';HOSTNAME=' . $this->_config['host']
            . ';PORT='     . $this->_config['port']
            // PDO_IBM supports only DB2 TCPIP protocol
            . ';PROTOCOL=' . 'TCPIP;';
        } else {
            // catalogued connection
            $dsn = $this->_config['dbname'];
        }
        return $this->_pdoType . ': ' . $dsn;
    }
1035135
protected function getDsn(array $config)
    {
        return $this->hasDsnString($config) ? $this->getDsnString($config) : $this->getHostDsn($config);
    }
672829
public function getBban()
    {
        $bban = '';
        $iban = $this->getIban();
        if (!empty($iban)) {
            $bban = substr($iban, 4);
        }
        return $bban;
    }
1275027
static private function parseDsn($dsnStr) {
        if( empty($dsnStr) ){return false;}
        $info = parse_url($dsnStr);
        if(!$info) {
            return false;
        }
        $dsn = array(
            'type'      =>  $info['scheme'],
            'username'  =>  isset($info['user']) ? $info['user'] : '',
            'password'  =>  isset($info['pass']) ? $info['pass'] : '',
            'hostname'  =>  isset($info['host']) ? $info['host'] : '',
            'hostport'  =>  isset($info['port']) ? $info['port'] : '',
            'database'  =>  isset($info['path']) ? substr($info['path'],1) : '',
            'charset'   =>  isset($info['fragment'])?$info['fragment']:'utf8',
        );
        
        if(isset($info['query'])) {
            parse_str($info['query'],$dsn['params']);
        }else{
            $dsn['params']  =   array();
        }
        return $dsn;
     }