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

SessionHandler::open()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0
crap 2
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