Session_Driver::open()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 1
1
<?php defined('SYSPATH') or die('No direct access allowed.');
2
/**
3
 * Session driver interface
4
 *
5
 * $Id: Session.php 3769 2008-12-15 00:48:56Z zombor $
6
 *
7
 * @package    Core
8
 * @author     Kohana Team
9
 * @copyright  (c) 2007-2008 Kohana Team
10
 * @license    http://kohanaphp.com/license.html
11
 */
12
interface Session_Driver
13
{
14
15
    /**
16
     * Opens a session.
17
     *
18
     * @param   string   save path
19
     * @param   string   session name
20
     * @return  boolean
21
     */
22
    public function open($path, $name);
23
24
    /**
25
     * Closes a session.
26
     *
27
     * @return  boolean
28
     */
29
    public function close();
30
31
    /**
32
     * Reads a session.
33
     *
34
     * @param   string  session id
35
     * @return  string
36
     */
37
    public function read($id);
38
39
    /**
40
     * Writes a session.
41
     *
42
     * @param   string   session id
43
     * @param   string   session data
44
     * @return  boolean
45
     */
46
    public function write($id, $data);
47
48
    /**
49
     * Destroys a session.
50
     *
51
     * @param   string   session id
52
     * @return  boolean
53
     */
54
    public function destroy($id);
55
56
    /**
57
     * Regenerates the session id.
58
     *
59
     * @return  string
60
     */
61
    public function regenerate();
62
63
    /**
64
     * Garbage collection.
65
     *
66
     * @param   integer  session expiration period
67
     * @return  boolean
68
     */
69
    public function gc($maxlifetime);
0 ignored issues
show
Coding Style introduced by
This method's name is shorter than the configured minimum length of 3 characters.

Even though PHP does not care about the name of your methods, it is generally a good practice to choose method names which can be easily understood by other human readers.

Loading history...
70
} // End Session Driver Interface
71