3 namespace Friendica\Core\Session;
6 use Friendica\Model\User\Cookie;
7 use SessionHandlerInterface;
10 * The native Session class which uses the PHP internal Session functions
12 final class Native extends AbstractSession implements ISession
14 public function __construct(App\BaseURL $baseURL, SessionHandlerInterface $handler = null)
16 ini_set('session.gc_probability', 50);
17 ini_set('session.use_only_cookies', 1);
18 ini_set('session.cookie_httponly', (int)Cookie::HTTPONLY);
20 if ($baseURL->getSSLPolicy() == App\BaseURL::SSL_POLICY_FULL) {
21 ini_set('session.cookie_secure', 1);
24 if (isset($handler)) {
25 session_set_save_handler($handler);
32 public function start()