Lines Matching full:data
6 * The preference cookie is used to store small user preference data
10 * Data is stored as key#value#key#value string, with all keys and values being urlencoded
17 protected array $data = []; variable in dokuwiki\\PrefCookie
20 * Initialize the class from the cookie data
24 $this->data = $this->decodeData($_COOKIE[self::COOKIENAME] ?? '');
36 return $this->data[$pref] ?? $default;
51 if (isset($this->data[$pref])) {
52 unset($this->data[$pref]);
55 $this->data[$pref] = $value;
70 ksort($this->data); // sort by key
72 $newdata = self::encodeData($this->data);
77 // update the cookie data for the current request
93 * Decode the cookie data (if any)
95 * @return array the cookie data as associative array
99 $data = [];
100 if ($rawdata === '') return $data;
111 $data[urldecode($parts[$i])] = urldecode($parts[$i + 1]);
114 return $data;
118 * Encode the given cookie data
120 * @param array $data the cookie data as associative array
123 protected function encodeData(array $data): string argument
127 foreach ($data as $key => $val) {