foreveralone

foreveralone Git Source Tree


Root/web/application/models/sessions.php

<?php

namespace application\models;

class Sessions extends \system\engine\HF_Model {
    public $sessionid;
    public $ip;
    public $userAgent;
    public $data;
    public $waiting;
    public $to_user;
    public $lastPing;
    public $random;

    public function setData($key, $val) {
        $raw = json_decode($this->data, true);
        $raw[$key] = $val;
        $this->data = json_encode($raw);
    }

    public function getData($key) {
        $raw = json_decode($this->data, true);
        if (isset($raw[$key])) {
            return $raw[$key];
        } else {
            return null;
        }
    }
}

Archive Download this file

Branches

Tags

Number of commits:
Page rendered in 0.33154s using 11 queries.