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(); }
public function getProtocol() { return App::isSSL() ? 'https://' : 'http://'; }