将 参数数组 变回 字符串形式的参数格式

@param array $array_query

@return string
5810
public static function getUrlQuery(array $array_query)
    {
        $tmp = [];
        foreach ($array_query as $name => $value) {
            if (is_array($value)) {
                foreach ($value as $k => $v) {
                    $tmp[] = "{$name}[{$k}]={$v}";
                }
            } else {
                $tmp[] = "{$name}={$value}";
            }
        }
        
        return implode('&', $tmp);
    }
232082
public function getRequestQueryKey()
    {
        $uri = explode('?', $this->getEnv('REQUEST_URI'));

        array_shift($uri);
        parse_str(implode('?', $uri), $qrs);

        return array_keys($qrs);
    }
1104051
public function getQuery(): string
    {
        $sql = $this->getSql();

        $sql = str_replace(['%', '?'], ['%%', '"%s"'], $sql);

        // replace mask by data
        return vsprintf($sql, $this->getParams());
    }
29876
public function getQueryString() {
        // The variable $_SERVER['QUERY_STRING'] is set by the server and can differ from the transmitted query string.
        // It might hold additional parameters added by the server or it might be empty (e.g. on a mis-configured nginx).

        if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING'])) {
            $query = $_SERVER['QUERY_STRING'];
        }
        else {
            $query = strRightFrom($_SERVER['REQUEST_URI'], '?');
        }
        return $query;
    }
620830
public function query($array)
	{
		$array['action'] = 'query';
		$array['format'] = 'php';

		$apiResult = $this->session->get($this->api.'?'.http_build_query($array));

		return unserialize($apiResult->body);
	}
12545
private function getQueryString()
    {
        foreach ($_SERVER as $key => $value) {
            if (!in_array($key, $this->ignore)) {
                if ($key == 'REMOTE_ADDR') {
                    $this->comment[$key] = $this->comment['user_ip'];
                } else {
                    $this->comment[$key] = $value;
                }
            }
        }

        $query_string = '';

        foreach ($this->comment as $key => $data) {
            @$query_string .= $key . '=' . urlencode(stripslashes($data)) . '&';
        }

        return $query_string;
    }
1094465
final function GetVar($qry, $row_no = 0, $offset = 0)
    {
        if ($this->lock_sel_data) {
            return array();
        }
        if ($this->Query($qry)) {
            $this->result = $this->Fetch($this->query_result, $row_no, $offset);
            $this->SetDebugDump($offset);

            return $this->result[0][0];
        }
        return array();
    }
254363
public static function viewArray($array_in) {
		if (is_array($array_in)) {
			$result = '
			<table border="1" cellpadding="1" cellspacing="0" bgcolor="white">';
			if (count($array_in) == 0) {
				$result .= '<tr><td><font face="Verdana,Arial" size="1"><strong>EMPTY!</strong></font></td></tr>';
			} else {
				foreach ($array_in as $key => $val) {
					$result .= '<tr>
						<td valign="top"><font face="Verdana,Arial" size="1">' . htmlspecialchars((string) $key) . '</font></td>
						<td>';
					if (is_array($val)) {
						$result .= self::viewArray($val);
					} elseif (is_object($val)) {
						$string = '';
						if (method_exists($val, '__toString')) {
							$string .= get_class($val) . ': ' . (string) $val;
						} else {
							$string .= print_r($val, TRUE);
						}
						$result .= '<font face="Verdana,Arial" size="1" color="red">' .
								   nl2br(htmlspecialchars($string)) .
								   '<br /></font>';
					} else {
						if (gettype($val) == 'object') {
							$string = 'Unknown object';
						} else {
							$string = (string) $val;
						}
						$result .= '<font face="Verdana,Arial" size="1" color="red">' .
								   nl2br(htmlspecialchars($string)) .
								   '<br /></font>';
					}
					$result .= '</td>
					</tr>';
				}
			}
			$result .= '</table>';
		} else {
			$result = '<table border="1" cellpadding="1" cellspacing="0" bgcolor="white">
				<tr>
					<td><font face="Verdana,Arial" size="1" color="red">' .
					  nl2br(htmlspecialchars((string) $array_in)) .
					  '<br /></font></td>
				</tr>
			</table>'; // Output it as a string.
		}
		return $result;
	}
364387
public function logQuery(array $query)
    {
        $this->queries[] = $query;

        if ($this->logger) {
            $this->logger->info('MongoDB Query: '.json_encode($query));
        }
    }
1113416
public static function arrayToKey(array $array): string {
        $result = "";
        \array_walk_recursive($array, function ($key, $value) use (&$result) {
            $result .= $key . $value;
        });
        return $result;
    }
697682
protected function guessQuery(array $query): Query
    {
        $server = $query['server'] ?? $this->getServer();
        $sql = $query['query'];
        $bindings = $query['bindings'] ?? [];
        $tables = $query['files'] ?? [];
        $settings = $query['settings'] ?? [];
        
        return $this->createQuery($server, $sql, $bindings, $tables, $settings);
    }
327750
public function query()
    {
        $params = func_get_args();
        $query = array_shift($params);

        // Support one argument of type array, instead of n arguments
        if (count($params) == 1 && is_array($params[0])) {
            $params = $params[0];
        }

        return $this->_query($query, 0, 0, $params);
    }
537212
public function getQueryString()
    {
        $qs = static::normalizeQueryString($this->getRequest()->server->get('QUERY_STRING'));

        return '' === $qs ? null : $qs;
    }
192178
public function getList(array $query = [])
    {
        $resource = self::DOMUSERP_API_OPERACIONAL . '/' . $this->cityId .'/bairros';
        $list = $this->pagination($resource);

        return $list;
    }
141157
public function getQuery(): string {
        $query  = $this->query;
        $values = $this->values;

        $matches = null;
        preg_match_all('/[?][#@][a-zA-Z]?[a-zA-Z0-9_]*/', $query, $matches);
        $matches = count($matches) > 0 ? $matches[0] : array();

        foreach ($matches as $i) {
            $varName = substr($i, 2);
            if ($varName != '') {
                if (!isset($this->values[$varName])) {
                    throw new RuntimeException('no value for variable ' . $varName);
                }
                $value = $values[$varName];
                unset($values[$varName]);
            } else {
                if (count($values) == 0) {
                    throw new RuntimeException('number of values lower then the number of variables in the query');
                }
                $value = array_shift($values);
            }
            $value = substr($i, 1, 1) == '#' ? QueryParameter::escapeLiteral($value) : QueryParameter::escapeUri($value);
            $value = str_replace(array('\\', '$'), array('\\\\', '\\$'), $value); // preg replace special chars escape
            $query = preg_replace('/[?][#@]' . $varName . '/', $value, $query, 1);
        }
        if (count($values) > 0) {
            throw new RuntimeException('number of values greater then the number of variables in the query');
        }

        return $query;
    }
900836
protected static function appendQuery(string $uri, array $query = []): string {
        if (!empty($query)) {
            $qs = http_build_query($query);
            $uri .= (strpos($uri, '?') === false ? '?' : '&').$qs;
        }
        return $uri;
    }
994521
public function getRawSql()
    {
        $search = array();
        $replace = array();
        $params = $this->getParams();
        ksort($params, SORT_STRING);
        foreach ($params as $key => $value) {
            if (is_int($key)) {
                $key = '?';
            }
            $search[] = $key;
            if (is_string($value)) {
                $value = "'$value'";
            }
            $replace[] = $value;
        }
        return str_replace($search, $replace, $this->getSql());
    }