当前位置: 首页>>代码示例>>PHP>>正文


PHP Store::start方法代码示例

本文整理汇总了PHP中Illuminate\Session\Store::start方法的典型用法代码示例。如果您正苦于以下问题:PHP Store::start方法的具体用法?PHP Store::start怎么用?PHP Store::start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Session\Store的用法示例。


在下文中一共展示了Store::start方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dispatch

 protected function dispatch()
 {
     $name = $this->getName();
     if (isset($_COOKIE[$name]) && ($sessionId = $_COOKIE[$name])) {
         $this->setId($sessionId);
     } else {
         if (!isset($_COOKIE[$name])) {
             setcookie($name, $this->getId(), time() + 60 * $this->config['lifetime'], $this->config['path'], $this->config['domain'], $this->config['secure'], $this->config['http_only']);
         }
     }
     parent::start();
     register_shutdown_function([$this, 'save']);
 }
开发者ID:laraport,项目名称:session,代码行数:13,代码来源:Session.php

示例2: validateCredential

 /**
  * Called by workerman application<br>
  * 检验凭证。 参数是凭证数据。如果检验通过,请返回用户ID;否则返回false
  * @param $credential
  * @return bool|integer
  */
 public function validateCredential($credential)
 {
     list($sessionId, $token) = $credential;
     $sessionId = \Crypt::decrypt($sessionId);
     $token = \Crypt::decrypt($token);
     $sessStore = new Store($sessionId, \App::make('session')->driver()->getHandler(), $sessionId);
     $sessStore->start();
     if ($sessStore->has($this->tokenKey)) {
         if ($sessStore->get($this->tokenKey) == $token) {
             $sessStore->remove($this->tokenKey);
             $userIdKey = 'login_' . md5('Illuminate\\Auth\\Guard');
             $userId = $sessStore->get($userIdKey);
             return $userId;
         }
     }
     return false;
 }
开发者ID:Hehe-Zhc,项目名称:workerboy,代码行数:23,代码来源:CredentialProcessor.php

示例3: start

 /**
  * Starts the session storage.
  *
  * @return bool True if session started.
  * @throws \RuntimeException If session fails to start.
  * @static 
  */
 public static function start()
 {
     return \Illuminate\Session\Store::start();
 }
开发者ID:satriashp,项目名称:tour,代码行数:11,代码来源:_ide_helper.php

示例4: start

 /**
  * {@inheritdoc}
  */
 public function start()
 {
     $this->store->start();
     return $this;
 }
开发者ID:barryvdh,项目名称:laravel-elfinder,代码行数:8,代码来源:LaravelSession.php

示例5: createStorage

 protected function createStorage($sessionId = null)
 {
     if ($sessionId !== null) {
         // $name = '/Google_Client';
         // $path = session_save_path().'/'.$name;
         $name = 'Recca0120Socialite';
         $path = sys_get_temp_dir() . '/' . $name;
         $sessionId = sha1(serialize($sessionId));
         $file = new Filesystem();
         if ($file->isDirectory($path) === false) {
             $file->makeDirectory($path, 0755, true);
         }
         $handler = new FileSessionHandler($file, $path);
         $session = new LaravelSession($name, $handler, $sessionId);
         // $handler = new SymfonyFileHandler($path);
         // $session = new SymfonySession($handler);
         $session->setId($sessionId);
         $session->start();
         $this->saveSessionWhenShutdown($session);
     } else {
         $session = static::$session;
         if ($session === null) {
             $session = $this->request->getSession();
             if ($session === null) {
                 if (session_status() == PHP_SESSION_NONE) {
                     $handler = new SymfonyNativeSessionHandler();
                 } else {
                     $handler = new SymfonyPhpBridgeSessionHandler();
                 }
                 $session = new SymfonySession($handler);
                 $session->start();
                 $this->saveSessionWhenShutdown($session);
             }
             static::$session = $session;
         }
     }
     $storage = new Storage($session);
     return $storage;
 }
开发者ID:recca0120,项目名称:socialite,代码行数:39,代码来源:Service.php

示例6: let

 function let(Store $session)
 {
     $session->start();
     $this->beConstructedWith($session);
 }
开发者ID:spatie,项目名称:checkout,代码行数:5,代码来源:CheckoutSpec.php


注:本文中的Illuminate\Session\Store::start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。