| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 2 | class DBSessionModel extends DBSessionHandlerModel{ |
||
| 3 | |||
| 4 | protected $_table = 'ses'; |
||
| 5 | protected $primary_key = 's_id'; |
||
| 6 | |||
| 7 | protected $sessionTableColumns = array( |
||
| 8 | 'sid' => 's_id', //VARCHAR(255) |
||
| 9 | 'sdata' => 's_data', //TEXT |
||
| 10 | 'stime' => 's_time', //unix timestamp (INT|BIGINT) |
||
| 11 | 'shost' => 's_host', //VARCHAR(255) |
||
| 12 | 'sip' => 's_ip', //VARCHAR(255) |
||
| 13 | 'sbrowser' => 's_browser', //VARCHAR(255) |
||
| 14 | 'skey' => 'usr_id' //VARCHAR(255) |
||
| 15 | ); |
||
| 16 | |||
| 17 | public function deleteByTime($time){ |
||
| 18 | $this->_database->from($this->_table) |
||
| 19 | ->where('s_time', '<', $time) |
||
| 20 | ->delete(); |
||
| 21 | } |
||
| 22 | |||
| 23 | |||
| 24 | public function getKeyValue(){ |
||
| 27 | } |
||
| 28 | } |