|
@@ 800-806 (lines=7) @@
|
| 797 |
|
} |
| 798 |
|
|
| 799 |
|
// Does it exists on redis? |
| 800 |
|
if ($this->redis->exists($this->_chat_id . ':language')) { |
| 801 |
|
|
| 802 |
|
// Get the value |
| 803 |
|
$this->language = $this->redis->get($this->_chat_id . ':language'); |
| 804 |
|
return $this->language; |
| 805 |
|
|
| 806 |
|
} |
| 807 |
|
|
| 808 |
|
// If it doens't exist, set $language to $default_language |
| 809 |
|
$this->language = $default_language; |
|
@@ 836-842 (lines=7) @@
|
| 833 |
|
} |
| 834 |
|
|
| 835 |
|
// Does it exists on redis? |
| 836 |
|
if ($this->redis->exists($this->_chat_id . ':language')) { |
| 837 |
|
|
| 838 |
|
// Get the value |
| 839 |
|
$this->language = $this->redis->get($this->_chat_id . ':language'); |
| 840 |
|
return $this->language; |
| 841 |
|
|
| 842 |
|
} |
| 843 |
|
|
| 844 |
|
// Set the value from the db |
| 845 |
|
$this->redis->setEx($this->_chat_id . ':language', $expiring_time, $this->getLanguageDatabase($default_language)); |
|
@@ 1034-1040 (lines=7) @@
|
| 1031 |
|
|
| 1032 |
|
} |
| 1033 |
|
|
| 1034 |
|
if ($this->redis->exists($this->_chat_id . ':status')) { |
| 1035 |
|
|
| 1036 |
|
$this->status = $this->redis->get($this->_chat_id . ':status'); |
| 1037 |
|
|
| 1038 |
|
return $this->status; |
| 1039 |
|
|
| 1040 |
|
} |
| 1041 |
|
|
| 1042 |
|
$this->redis->set($this->_chat_id . ':status', $default_status); |
| 1043 |
|
$this->status = $default_status; |