protected isSessionStarted ( ) : boolean | ||
return | boolean | セッションが開始済みの場合 true |
protected function isSessionStarted()
{
if (php_sapi_name() !== 'cli') {
if (version_compare(phpversion(), '5.4.0', '>=')) {
return session_status() === PHP_SESSION_ACTIVE ? true : false;
} else {
return session_id() === '' ? false : true;
}
}
return false;
}