本文整理匯總了PHP中Illuminate\Session\SessionManager::getSessionConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP SessionManager::getSessionConfig方法的具體用法?PHP SessionManager::getSessionConfig怎麽用?PHP SessionManager::getSessionConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Session\SessionManager
的用法示例。
在下文中一共展示了SessionManager::getSessionConfig方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: sessionIsPersistent
/**
* Determine if the configured session driver is persistent.
*
* @param array|null $config
* @return bool
*/
protected function sessionIsPersistent(array $config = null)
{
// Some session drivers are not persistent, such as the test array driver or even
// when the developer don't have a session driver configured at all, which the
// session cookies will not need to get set on any responses in those cases.
$config = $config ?: $this->manager->getSessionConfig();
return !in_array($config['driver'], array(null, 'array'));
}
示例2: getSessionConfig
/**
* Get the session configuration.
*
* @return array
* @static
*/
public static function getSessionConfig()
{
return \Illuminate\Session\SessionManager::getSessionConfig();
}
示例3: getCookieExpirationDate
/**
* Get the cookie lifetime in seconds.
*
* @return int
*/
protected function getCookieExpirationDate()
{
$config = $this->manager->getSessionConfig();
return $config['expire_on_close'] ? 0 : Carbon::now()->addMinutes($config['lifetime']);
}