Lines Matching refs:key
205 foreach ($_REQUEST as $key => $value) {
209 if ($key !== "config") {
211 …LogUtility::warning("The key ($key) is an array of an array and was not taken into account in the …
216 if ($key == "do") {
218 $url->addQueryParameter($key, $subkey);
221 $url->addQueryParameter($key, $subval);
232 if (strpos($key, "amp;") === 0) {
237 …$message = "The url in src has a bad encoding (the attribute ($key) has a amp; prefix. Infinite ca…
248 if (in_array($key, ['u', 'p', 'http_credentials', 'r'])) {
251 $url->addQueryParameter($key, $value);
276 function getQueryPropertyValue($key) argument
278 $value = $this->query[$key];
280 throw new ExceptionNotFound("The key ($key) was not found");
357 public function addQueryParameter(string $key, ?string $value = null): Url argument
362 if (substr($key, -2) === "[]") {
363 $key = substr($key, 0, -2);
364 $actualValue = $this->query[$key];
366 $this->query[$key] = [$value];
369 $this->query[$key] = $actualValue;
373 if (isset($this->query[$key])) {
374 $actualValue = $this->query[$key];
376 $this->query[$key][] = $value;
378 $this->query[$key] = [$actualValue, $value];
381 $this->query[$key] = $value;
387 public function hasProperty(string $key): bool argument
389 if (isset($this->query[$key])) {
478 public function getQueryPropertyValueOrDefault(string $key, string $defaultIfNull) argument
481 return $this->getQueryPropertyValue($key);
534 foreach ($actualQuery as $key => $value) {
535 $expectedValue = $expectedQuery[$key];
537 throw new ExceptionNotEquals("The expected url does not have the $key property");
540 …throw new ExceptionNotEquals("The $key property does not have the same value ($value vs $expectedV…
542 unset($expectedQuery[$key]);
544 foreach ($expectedQuery as $key => $value) {
545 throw new ExceptionNotEquals("The expected URL has an extra property ($key=$value)");
610 foreach ($originalArray as $key => $value) {
622 $queryString .= urlencode($key);
630 $queryString .= urlencode($key) . "[]=" . urlencode($val);
633 $queryString .= urlencode($key) . "=" . urlencode($value);
645 public function getQueryPropertyValueAndRemoveIfPresent(string $key) argument
647 $value = $this->getQueryPropertyValue($key);
648 unset($this->query[$key]);
874 * @param string $key
878 public function addQueryParameterIfNotActualSameValue(string $key, string $value): Url argument
881 $actualValue = $this->getQueryPropertyValue($key);
883 $this->addQueryParameter($key, $value);
886 $this->addQueryParameter($key, $value);
914 public function addQueryParameterIfNotPresent(string $key, string $value) argument
916 if (!$this->hasProperty($key)) {
917 $this->addQueryParameterIfNotActualSameValue($key, $value);
923 * @param string $key
927 public function setQueryParameter(string $key, string $value): Url argument
929 $this->deleteQueryParameter($key);
930 $this->addQueryParameter($key, $value);
934 public function deleteQueryParameter(string $key) argument
936 unset($this->query[$key]);