⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
erp.dev-unit.com
/
vendor
/
spatie
/
url
/
src
/
View File Name :
QueryParameterBag.php
<?php namespace Spatie\Url; class QueryParameterBag implements \Stringable { public function __construct( protected array $parameters = [], ) { // } public static function fromString(string $query = ''): static { if ($query === '') { return new static(); } $parameters = []; parse_str($query, $parameters); $parameters = array_map(fn ($param) => $param !== '' ? $param : null, $parameters); return new static($parameters); } public function get(string $key, mixed $default = null): mixed { if ($this->has($key)) { return $this->parameters[$key]; } return is_callable($default) ? $default() : $default; } public function has(string $key): bool { return array_key_exists($key, $this->parameters); } public function set(string $key, string|array $value): self { $this->parameters[$key] = $value; return $this; } public function unset(string $key): self { unset($this->parameters[$key]); return $this; } public function unsetAll(): self { $this->parameters = []; return $this; } public function all(): array { return $this->parameters; } public function __toString(): string { return http_build_query($this->parameters, '', '&', PHP_QUERY_RFC3986); } }