Get the database connection and table name.

@param array $parameters

@return array
18040
protected function getConnectionAndTable($parameters)
    {
        $parts = explode('.', $this->getParameter($parameters, 0));

        $connection = isset($parts[1])
            ? $parts[0]
            : Config::get('database.default');

        $table = $parts[1] ?? $parts[0];

        return [$connection, $table];
    }
241973
protected function parameterValues($parameters)
    {
        $values = array();
        foreach ($parameters as $value) {
            $values[] = is_array($value) ? $value['value'] : $value;
        }
        return $values;
    }
1260326
public function getObjects(array $parameters = array())
    {
        $objects = array();

        foreach ($this->getObjectsInfo($parameters) as $record) {
            $objects[] = new Object($this, null, false, $record);
        }

        return $objects;
    }
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);
    }
836436
public static function listAllBraintreeGatewaysAsync(array $parameters = [])
    {
        return self::listAllBraintreeGatewaysAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
974544
protected function clientGetScope(array $parameters): ?array
    {
        $scope = $this->clientReadStringValue($parameters, 'scope');

        return empty($scope) === false ? explode(' ', $scope) : null;
    }
707318
public function getSQLParamNames() : array
   {

      $out = [];

      foreach ( $this->_attributes as $attributeName => $attribute )
      {
         if ( Type::INIT_SQL === $attribute->getType() )
         {
            $out[] = $attributeName;
         }
      }

      return $out;

   }
302295
public function where($conditions, ...$parameters)
    {
        if (is_array($conditions)) {
            $this->where = array_merge($this->where, array_map(function ($value, $field) {
                $field = $this->connection->quoteIdentifier($field);
                if ($value === null) {
                    return $field . ' IS NULL';
                }

                return $field . '=' . $this->connection->quote($value);
            }, $conditions, array_keys($conditions)));
        } else {
            if ($parameters) {
                $conditions = $this->connection->merge($conditions, $parameters);
            }
            $this->where[] = $conditions;
        }

        return $this;
    }
10536
public function getServiceDataDatabaseConnections(array $params) {

        $dataPostgresql = new \Cityware\Monitoring\Models\Services\DataPostgreSql($params);

        $connectionsDatabases = $dataPostgresql->getDataPgSqlDatabasesConnections();

        $return = Array();
        
        $geoipV1 = new \Cityware\Utility\GeoIpV1();
        $geoipV1->geoip_open(DATA_PATH . 'GeoIp/GeoIPASNum.dat', GEOIP_STANDARD);

        foreach ($connectionsDatabases as $key => $value) {

            $desAsnIsp = (!empty($value['client_addr'])) ? \Cityware\Format\Text::convertString($geoipV1->geoip_name_by_addr($value['client_addr'])) : '';

            $return[$key]['des_ip'] = $value['client_addr'];
            $return[$key]['des_asn_isp'] = strtoupper(\Cityware\Format\Text::removeAccents($desAsnIsp));
            $return[$key]['des_hash'] = hash('crc32b', $value['datname']);
            $return[$key]['nam_database'] = $value['datname'];
            $return[$key]['num_total_connections'] = $value['total_connections'];
        }

        return $return;
    }
245200
public function getPath(array $parameters)
    {
        foreach ($parameters as $parameterName => $parameterValue) {
            $parameterMethod = 'set' . ucfirst($parameterName);

            $this->$parameterMethod($parameterValue);
        }

        return $this->buildPath();
    }
1038279
public function createConnection($parameters)
    {
        $connection = new \PDO(
            'mysql:host=' . $parameters['host'] . ';dbname=' . $parameters['database'],
            $parameters['username'],
            $parameters['password']
        );

        if (isset($parameters['charset'])) {
            $connection->exec('SET CHARACTER SET ' . $parameters['charset']);
        }

        return $connection;
    }
700971
public static function listAllTableRateRulesAsync(array $parameters = [])
    {
        return self::listAllTableRateRulesAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
1014680
protected function _getShortNames($parameters)
    {
        $shortNames = [];
        foreach ($parameters as $parameter) {
            $rc = $parameter->getClass();
            if ($rc && is_subclass_of($rc->getName(), Component::class)) {
                continue;
            }

            $name = $parameter->getName();
            $short = $name[0];
            if (isset($names[$short])) {
                $shortNames[$short] = false;
            } else {
                $shortNames[$short] = $name;
            }
        }
        return array_flip(array_filter($shortNames));
    }
970249
protected function getParameters(array $parameters)
    {
        return empty($parameters) ? $this->parameters : array_merge($this->parameters, $parameters);
    }
1128208
public function getTables()
    {
        $tables = [];
        if ($this->serverSupportFeature(3)) {
            $result = $this->runMongoCommand(['listCollections' => 1]);
            foreach ($result as $val) {
                $tables[] = $val['name'];
            }
        } else {
            $result = $this->runMongoQuery('system.namespaces');
            foreach ($result as $val) {
                if (strpos($val['name'], '$') === false) {
                    $tables[] = substr($val['name'], strpos($val['name'], '.') + 1);
                }
            }
        }

        return $tables;
    }
1110852
public function getSdkCommand($parameters = [])
    {
        if ($this instanceof Query) {
            return parent::getSdkCommand($parameters);
        }

        if (isset($parameters['TotalSegments'])) {
            $segments = $parameters['TotalSegments'];
        } elseif (isset($this->parameters['TotalSegments'])) {
            $segments = $this->parameters['TotalSegments'];
        }

        if (isset($segments)) {
            $commands = [];
            for ($i = 0; $i < $segments; $i++) {
                $commandParams            = $parameters;
                $commandParams['Segment'] = $i;
                $commands[]               = parent::getSdkCommand($commandParams);
            }

            return $commands;
        }

        return parent::getSdkCommand($parameters);
    }
630451
public static function listAllVariantsAsync(array $parameters = [])
    {
        return self::listAllVariantsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }