From 90673ef19133e037cf401773f4262ba3d7d050bf Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 3 Aug 2025 04:06:53 +0200 Subject: =?UTF-8?q?r=C3=A9organisation=204:=20d=C3=A9placement=20de=20fich?= =?UTF-8?q?iers,=20plus=20que=20des=20contr=C3=B4leurs=20dans=20/src/contr?= =?UTF-8?q?oller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller/URL.php | 88 -------------------------------------------------- 1 file changed, 88 deletions(-) delete mode 100644 src/controller/URL.php (limited to 'src/controller/URL.php') diff --git a/src/controller/URL.php b/src/controller/URL.php deleted file mode 100644 index 3ebc488..0000000 --- a/src/controller/URL.php +++ /dev/null @@ -1,88 +0,0 @@ -params = $gets; - if($anchor != ''){ - $this->setAnchor($anchor); - } - } - - //setters normaux - public function addParams(array $gets): void - { - // array_merge est préféré à l'opérateur d'union +, si une clé existe déjà la valeur est écrasée - $this->params = array_merge($this->params, $gets); - } - public function setAnchor(string $anchor = ''): void - { - if($anchor != ''){ - $this->anchor = '#' . ltrim($anchor, '#'); - } - else{ - $this->anchor = ''; - } - } - - private function makeParams(): string - { - $output = ''; - $first = true; - - foreach($this->params as $key => $value) { - if($first){ - $output .= '?'; - $first = false; - } - else{ - $output .= '&'; - } - $output .= $key . '=' . $value; - } - return $output; - } - - public function __toString(): string - { - return self::$protocol . self::$host . self::$port . self::$path . $this->makeParams() . $this->anchor; - } -} \ No newline at end of file -- cgit v1.2.3