Requests_Cookie::normalize()

最后更新于:2021-11-26 01:10:19

Requests_Cookie::normalize()

Normalize cookie and attributes

响应

(boolean) Whether the cookie was successfully normalized

源文件

文件: gc-includes/Requests/Cookie.php

	public function normalize() {
		foreach ($this->attributes as $key => $value) {
			$orig_value = $value;
			$value      = $this->normalize_attribute($key, $value);
			if ($value === null) {
				unset($this->attributes[$key]);
				continue;
			}

			if ($value !== $orig_value) {
				$this->attributes[$key] = $value;
			}
		}

		return true;
	}