本文整理匯總了PHP中Illuminate\Session\Store::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Store::__construct方法的具體用法?PHP Store::__construct怎麽用?PHP Store::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Session\Store
的用法示例。
在下文中一共展示了Store::__construct方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct($name, $realHandler, $id = null)
{
$lockingSessionHandler = new LockingSessionHandler($realHandler);
return parent::__construct($name, $lockingSessionHandler, $id);
}
示例2: __construct
/**
* Create a new session instance.
*
* @param string $name
* @param \SessionHandlerInterface $handler
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
* @param string|null $id
* @return void
*/
public function __construct($name, SessionHandlerInterface $handler, EncrypterContract $encrypter, $id = null)
{
$this->encrypter = $encrypter;
parent::__construct($name, $handler, $id);
}
示例3: start
public function start()
{
$name = $this->config['cookie'];
$lifetime = $this->config['lifetime'];
$sessionId = $this->generateSessionId();
if ($this->config['driver'] instanceof SessionHandlerInterface) {
$this->setSessionHandler($this->config['driver']);
parent::__construct($name, $this->Handler);
return $this->dispatch();
}
switch ($this->config['driver']) {
case 'database':
parent::__construct($name, $this->databaseHandler());
break;
case 'file':
parent::__construct($name, $this->fileHandler());
break;
default:
case 'array':
parent::__construct($name, $this->arrayHandler());
break;
}
return $this->dispatch();
}