示例#1
5
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);
}
示例#2
0
 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);
 }
示例#3
0
 public function iteratorKeys()
 {
     return array_merge(parent::iteratorKeys(), array_keys($this->mutable));
 }
示例#4
0
 public function iteratorKeys()
 {
     return array_merge(parent::iteratorKeys(), array_keys($_SESSION));
 }
示例#5
-2
 public function LocalStorage()
 {
     if (LocalStorage::$mysqli == null) {
         LocalStorage::$mysqli = new mysqli(LOCALSTORAGE_HOST, LOCALSTORAGE_USERNAME, LOCALSTORAGE_PASSWORD, LOCALSTORAGE_DATABASE);
     }
 }