Completed
Pull Request — master (#3237)
by Emanuele
14:50
created

SessionHandler   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 50
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0
wmc 6
lcom 0
cbo 1

6 Methods

Rating   Name   Duplication   Size   Complexity  
A destroy() 0 4 1
A gc() 0 4 1
A read() 0 4 1
A write() 0 4 1
A close() 0 4 1
A open() 0 4 1
1
<?php
2
3
/**
4
 * PHP 5.3 compatibility for PHP 5.4's SessionHandler
5
 *
6
 * @name      ElkArte Forum
7
 * @copyright ElkArte Forum contributors
8
 * @license   BSD http://opensource.org/licenses/BSD-3-Clause
9
 *
10
 * @version 1.1
11
 *
12
 */
13
14
namespace ElkArte\sources\subs\SessionHandler;
15
16
/**
17
 * The SessionHandler class.
18
 *
19
 * PHP 5.3 compatibility for PHP 5.4's SessionHandler
20
 *
21
 * @link http://php.net/manual/en/class.sessionhandler.php
22
 */
23
class SessionHandler extends \AbstractModel implements SessionHandlerInterface
24
{
25
	/**
26
	 * {@inheritdoc}
27
	 */
28
	public function close()
29
	{
30
		return true;
31
	}
32
33
	/**
34
	 * {@inheritdoc}
35
	 */
36
	public function destroy($sessionId)
37
	{
38
		return true;
39
	}
40
41
	/**
42
	 * {@inheritdoc}
43
	 */
44
	public function gc($maxlifetime)
45
	{
46
		return true;
47
	}
48
49
	/**
50
	 * {@inheritdoc}
51
	 */
52
	public function open($savePath, $sessionId)
53
	{
54
		return true;
55
	}
56
57
	/**
58
	 * {@inheritdoc}
59
	 */
60
	public function read($sessionId)
61
	{
62
		return null;
63
	}
64
65
	/**
66
	 * {@inheritdoc}
67
	 */
68
	public function write($sessionId, $data)
69
	{
70
		return true;
71
	}
72
}
73