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, Cookie $cookie, SessionHandlerInterface $handler = null)
16 parent::__construct($cookie);
18 ini_set('session.gc_probability', 50);
19 ini_set('session.use_only_cookies', 1);
20 ini_set('session.cookie_httponly', (int)Cookie::HTTPONLY);
22 if ($baseURL->getSSLPolicy() == App\BaseURL::SSL_POLICY_FULL) {
23 ini_set('session.cookie_secure', 1);
26 if (isset($handler)) {
27 session_set_save_handler($handler);
34 public function start()