當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。