getConnectionDescriptor
@return array
162606
public function getConnectionDescriptor() {
        $reflectionClass = new \ReflectionClass($this->getConnection());
        $reflectionProperty = $reflectionClass->getProperty('_descriptor');
        $reflectionProperty->setAccessible(true);
        return $reflectionProperty->getValue($this->getConnection());
    }
874086
public function getConnection() {
        if (is_null($this->conn) || !($this->conn)) {
            $dsn = 'dblib:host=' . $this->host . ':1433;dbname=' . $this->db . ';charset=utf8';
            $this->conn = new \PDO($dsn, $this->user, $this->pass);

            if (is_bool($this->conn)) {
                throw new \Exception('unable to connect to db with provided credentials');
            }
        }

        return $this->conn;
    }
170293
public function getConnectionString()
    {
        $this->parseDsn();
        $connect_parameters = [
            sprintf(
                "user=%s dbname=%s",
                $this->configuration['user'],
                $this->configuration['database']
            )
        ];

        if ($this->configuration['host'] !== '') {
            $connect_parameters[] = sprintf('host=%s', $this->configuration['host']);
        }

        if ($this->configuration['port'] !== '') {
            $connect_parameters[] = sprintf('port=%s', $this->configuration['port']);
        }

        if ($this->configuration['pass'] !== '') {
            $connect_parameters[] = sprintf('password=%s', addslashes($this->configuration['pass']));
        }

        return join(' ', $connect_parameters);
    }
556720
protected function getConnectionDescription() {
        $host = $this->host;
        $port = $this->port     ? ':'.$this->port     : '';
        $db   = $this->database ? '/'.$this->database : '';
        return $host.$port.$db;
    }
681630
public function getConnection():ConnectionInterface
    {
        if (App::isCoContext()) {
            $connection = $this->getConnectionByChannel();
        } else {
            $connection = $this->getConnectionByQueue();
        }

        if ($connection->check() == false) {
            $connection->reconnect();
        }

        $this->addContextConnection($connection);
        return $connection;
    }
630439
public function getChannelDescriptor()
    {
        $descriptor = self::TECHNOLOGY .'/';
        if ($this->isGroup) {
            $descriptor .= $this->descendantOrder
                ? 'G'
                : 'g';
        }

        $descriptor .= $this->identifier.'/' .$this->target;

        return $descriptor;
    }
276928
public function getConnectionUrl(): string
    {
        return sprintf(
            '%s://%s:%d',
            $this->brokerPort->getTransmissionProtocol(),
            $this->host,
            $this->brokerPort->getBrokerPort()
        );
    }
489422
public static function getConnection() {
        global $PDOX, $CFG;

        if ( isset($PDOX) && is_object($PDOX) && get_class($PDOX) == 'Tsugi\Util\PDOX' ) {
            return $PDOX;
        }

        if ( defined('PDO_WILL_CATCH') ) {
            $PDOX = new \Tsugi\Util\PDOX($CFG->pdo, $CFG->dbuser, $CFG->dbpass);
            $PDOX->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
        } else {
            try {
                $PDOX = new \Tsugi\Util\PDOX($CFG->pdo, $CFG->dbuser, $CFG->dbpass);
                $PDOX->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
            } catch(\PDOException $ex){
                error_log("DB connection: ".$ex->getMessage());
                die('Failure connecting to the database, see error log'); // with error_log
            }
        }
        if ( isset($CFG->slow_query) ) $PDOX->slow_query = $CFG->slow_query;
        return $PDOX;
    }
679556
public function getConnection()
    {
        if (!$this->connection) {
            if ($this->connectionName) {
                $this->connection = $this->mandango->getConnection($this->connectionName);
            } else {
                $this->connection = $this->mandango->getDefaultConnection();
            }
        }

        return $this->connection;
    }
660327
public function getConnect()
    {
        if (! $this->isConnected()) {
            $this->connect();
            if (! $this->conn->getPdo() instanceof PDO) {
                $this->conn->reconnect();
            }
        }
        return $this->conn;
    }
840811
public function GetOwningBundleConnection()
    {
        $oOwningBundleConnection = $this->GetFromInternalCache('oOwningBundleConnection');
        if (is_null($oOwningBundleConnection)) {
            $oOwningBundleConnection = false;
            if (!is_null($this->id)) {
                $oOwningOrderItem = TdbShopBundleArticle::GetNewInstance();
                /** @var $oOwningOrderItem TdbShopBundleArticle */
                if (!$oOwningOrderItem->LoadFromField('bundle_article_id', $this->id)) {
                    $oOwningOrderItem = false;
                }
            }
            $this->SetInternalCache('oOwningBundleConnection', $oOwningBundleConnection);
        }

        return $oOwningBundleConnection;
    }
217692
public function getConnectionsFromResource() : Array
	{	
		$baseDir = dirname(__DIR__);
		$configLocation = $baseDir . '/config.php';
	
		if (!file_exists($configLocation) && class_exists(Config::class)) {
			$resourceConfig = Config::get('database');
		}else{
			$resourceConfig = include $configLocation;
		}

		if (gettype($resourceConfig) !== 'array') {
			throw new Exception('Invalid configuration type.');
		}
		
		return $resourceConfig;
	}
1266374
public function getConnectionHandlersAsArray()
    {

        // initialize the array for the connection handlers
        $connectionHandlers = array();

        // iterate over the connection handler nodes and sort them into an array
        /** @var \AppserverIo\Appserver\Core\Api\Node\ConnectionHandlerNode $connectionHandler */
        foreach ($this->getConnectionHandlers() as $connectionHandler) {
            $connectionHandlers[$connectionHandler->getUuid()] = $connectionHandler->getType();
        }

        // return the array
        return $connectionHandlers;
    }
424031
public function getConnectorLeft()
    {
        if ($this->customConnectorLeft === null) {
            return $this->connectorArray[$this->type][0];
        }

        return $this->customConnectorLeft;
    }
518382
public static function getAllEntityDescriptors() {
		$entities = array();
		foreach( static::getAllEntities() as $entity ) {
			$entities[$entity] = EntityDescriptor::load($entity);
		}
		return $entities;
	}
94036
public Connector[] getConnectors() {
        if (connectors != null) {
            return Arrays.copyOf(connectors, connectors.length);
        } else {
            return new Connector[]{};
        }
    }
351428
public function getConnection()
    {
        if (null === $this->conn) {
            $this->checkConfiguration();

            try {
                $this->conn = new SQL(
                    $this->buildDsn(),
                    $this->config['username'],
                    $this->config['password']
                );
            } catch (Exception $e) {
                throw new RuntimeException(static::E_CONNECT);
            }
        }

        return $this->conn;
    }