summaryrefslogtreecommitdiffstats
path: root/library/Icinga/Web/Session/Php72Session.php
blob: e6a6b19197b46b05f7aab6d2725c5aba9790480d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/* Icinga Web 2 | (c) 2017 Icinga Development Team | GPLv2+ */

namespace Icinga\Web\Session;

use Icinga\Application\Logger;
use Icinga\Exception\ConfigurationError;
use Icinga\Web\Cookie;

/**
 * Session implementation in PHP
 */
class Php72Session extends PhpSession
{
    /**
     * Open a PHP session
     */
    protected function open()
    {
        session_name($this->sessionName);

        $cookie = new Cookie('bogus');
        session_set_cookie_params(
            0,
            $cookie->getPath(),
            $cookie->getDomain(),
            $cookie->isSecure(),
            true
        );

        session_start(array(
            'use_cookies'       => true,
            'use_only_cookies'  => true,
            'use_trans_sid'     => false
        ));
    }
}