function localStorage($key, $value = "") { $obj = new LocalStorage(); if ($value !== "" && $value !== null) { $obj->add($key, serialize($value)); return; } else { if ($value === null) { $obj->delete($key); } } $value = $obj->get($key); return $value == null ? null : unserialize($value); }
public function iteratorKeys() { $data = sqlite_array_query($this->db, 'SELECT keystr FROM is4c_local', SQLITE_NUM); $keys = array(); foreach ($data as $row) { $keys[] = $row[0]; } return array_merge(parent::iteratorKeys(), $keys); }
public function iteratorKeys() { return array_merge(parent::iteratorKeys(), array_keys($this->mutable)); }
public function iteratorKeys() { return array_merge(parent::iteratorKeys(), array_keys($_SESSION)); }
public function LocalStorage() { if (LocalStorage::$mysqli == null) { LocalStorage::$mysqli = new mysqli(LOCALSTORAGE_HOST, LOCALSTORAGE_USERNAME, LOCALSTORAGE_PASSWORD, LOCALSTORAGE_DATABASE); } }