Exemple #1
0
 public function __construct()
 {
     // if tested locally $_SERVER['SERVER_NAME'] will most probably give "localhost" wich results in a problem setting the cookie in chrome
     // so I leave it NULL
     session_set_cookie_params(60 * 60 * 24, '/', NULL, (bool) App::isSSL(), true);
     session_start();
 }
Exemple #2
0
 public function getProtocol()
 {
     return App::isSSL() ? 'https://' : 'http://';
 }