public function setHost($host) { if (substr($host, -1) === '/') { $host = substr($host, 0, strlen($host) - 1); } $this->host = $host; }