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


PHP SessionManager::forget方法代码示例

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


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

示例1: getIndex

 /**
  * Show the login form
  *
  * @return mixed
  */
 public function getIndex()
 {
     if ($this->request->ajax()) {
         $this->session->forget('url.intended');
     }
     return View::make('auth.login');
 }
开发者ID:jraymundoyrockdev,项目名称:api-gfccm-systems,代码行数:12,代码来源:AuthController.php

示例2: setLocation

 /**
  * Sets the location property to the drivers returned location object.
  *
  * @param string $ip
  */
 private function setLocation($ip = '')
 {
     // The location session key.
     $key = 'location';
     // Removes location from the session if config option is set
     if ($this->localHostForgetLocation()) {
         $this->session->forget($key);
     }
     // Check if the location has already been set in the current session
     if ($this->session->has($key)) {
         // Set the current driver to the current session location
         $this->location = $this->session->get($key);
     } else {
         $this->setIp($ip);
         $this->location = $this->driver->get($this->ip);
         // The locations object property 'error' will be true if an
         // exception has occurred trying to grab the location
         // from the driver. Let's try retrieving the
         // location from one of our fall-backs
         if ($this->location->error) {
             $this->location = $this->getLocationFromFallback();
         }
         $this->session->set($key, $this->location);
     }
 }
开发者ID:muhamadsyahril,项目名称:location,代码行数:30,代码来源:Location.php

示例3: fileDownload

 /**
  * The GET method that runs when a user needs to download a file
  *
  * @return JSON
  */
 public function fileDownload()
 {
     if ($response = $this->session->get('administrator_download_response')) {
         $this->session->forget('administrator_download_response');
         $filename = substr($response['headers']['content-disposition'][0], 22, -1);
         return response()->download($response['file'], $filename, $response['headers']);
     } else {
         return redirect()->back();
     }
 }
开发者ID:nanosolutions,项目名称:Laravel-Administrator,代码行数:15,代码来源:AdminController.php

示例4: clearPersistentData

 /**
  * {@inheritdoc}
  *
  * @see BaseFacebook::clearPersistentData()
  */
 protected function clearPersistentData($key)
 {
     if (!in_array($key, self::$kSupportedKeys)) {
         self::errorLog('Unsupported key passed to clearPersistentData.');
         return;
     }
     $session_var_name = $this->constructSessionVariableName($key);
     if ($this->laravelSession->has($session_var_name)) {
         $this->laravelSession->forget($session_var_name);
     }
 }
开发者ID:pageboost,项目名称:facebook-laravel,代码行数:16,代码来源:LaravelFacebook.php

示例5: getExisting

 /**
  * Get all alert from session flash
  * @return void
  */
 public function getExisting()
 {
     // Create message bag
     if (!$this->bag) {
         $this->bag = new MessageBag();
     }
     // Get messges from flash
     $flash = $this->session->get(self::SESSION_KEY);
     // Add Laravel errors
     if ($errors = $this->session->get('errors')) {
         foreach ($errors->all() as $error) {
             $this->bag->add('error', $error);
         }
     }
     if ($flash) {
         foreach ($flash as $type => $alerts) {
             if (is_array($alerts) and count($alerts)) {
                 foreach ($alerts as $alert) {
                     $this->bag->add($type, $alert);
                 }
             }
         }
     }
     foreach (array('success', 'error', 'warning') as $key) {
         if ($message = $this->session->get($key)) {
             // Get type
             $type = $key;
             if (!$type) {
                 $type = 'info';
             }
             // Add the message
             $this->bag->add($type, $message);
             // And remove from flash
             $this->session->forget($key);
         }
     }
 }
开发者ID:hsyngkby,项目名称:result,代码行数:41,代码来源:Result.php

示例6: setLocation

 /**
  * Sets the location property to the drivers returned location object.
  *
  * @param string $ip
  */
 private function setLocation($ip = '')
 {
     /*
      * Removes location from the session if config option is set
      */
     if ($this->localHostForgetLocation()) {
         $this->session->forget('location');
     }
     /*
      * Check if the location has already been set in the current session
      */
     if ($this->session->has('location')) {
         /*
          * Set the current driver to the current session location
          */
         $this->location = $this->session->get('location');
     } else {
         /*
          * Set the IP
          */
         $this->setIp($ip);
         /*
          * Set the location
          */
         $this->location = $this->driver->get($this->ip);
         /*
          * The locations object property 'error' will be true if an exception has
          * occurred trying to grab the location from the driver. Let's
          * try retrieving the location from one of our fall-backs
          */
         if ($this->location->error) {
             $this->location = $this->getLocationFromFallback();
         }
         $this->session->set('location', $this->location);
     }
 }
开发者ID:ktardthong,项目名称:beerhit,代码行数:41,代码来源:Location.php

示例7: remove

 /**
  * Remove a key from storage.
  *
  * @param string $key The key to remove.
  *
  * @return null
  */
 public function remove($key)
 {
     $this->session->forget($this->storageKey . '.' . $key);
     return null;
 }
开发者ID:khangaikh,项目名称:golocal,代码行数:12,代码来源:ParseSessionStorage.php

示例8: clear

 /**
  * Clear all the cart session data
  * @return boolean
  */
 public function clear()
 {
     return $this->session->forget(config('sescart.session_name'));
 }
开发者ID:abstracteverything,项目名称:sescart,代码行数:8,代码来源:CartManager.php


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