當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Store::get方法代碼示例

本文整理匯總了PHP中Illuminate\Session\Store::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Store::get方法的具體用法?PHP Store::get怎麽用?PHP Store::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Session\Store的用法示例。


在下文中一共展示了Store::get方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getUser

 public function getUser()
 {
     if ($this->user == false) {
         $this->user = $this->session->get("sharp_user");
     }
     return $this->user;
 }
開發者ID:dvlpp,項目名稱:sharp,代碼行數:7,代碼來源:SharpAuth.php

示例2: handle

 /**
  * Handle the event.
  */
 public function handle()
 {
     if (!$this->config->get('app.debug') && !$this->session->get(__CLASS__ . 'warned') && $this->request->path() == 'admin/dashboard' && $this->modules->get('anomaly.module.installer')) {
         $this->session->set(__CLASS__ . 'warned', true);
         $this->messages->error('streams::message.delete_installer');
     }
 }
開發者ID:huglester,項目名稱:streams-platform,代碼行數:10,代碼來源:CheckIfInstallerExists.php

示例3: errors

 /**
  * @return MessageBag
  */
 private function errors()
 {
     if (!isset($this->errors)) {
         $this->errors = $this->sessionStore->get('errors', new MessageBag([]));
     }
     return $this->errors;
 }
開發者ID:hughgrigg,項目名稱:ching-shop,代碼行數:10,代碼來源:ReplyComposer.php

示例4: getURL

 public function getURL($name)
 {
     if ($this->sessionManager->has($name = $this->getName($name))) {
         return $this->sessionManager->get($name);
     }
     return false;
 }
開發者ID:laravel-commode,項目名稱:navigation-bag,代碼行數:7,代碼來源:NavigationBag.php

示例5: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if ($this->session->has($this->sessionKey)) {
         $this->googleTagManager->set($this->session->get($this->sessionKey));
     }
     $response = $next($request);
     $this->session->flash($this->sessionKey, $this->googleTagManager->getFlashData());
     return $response;
 }
開發者ID:paul-schulleri,項目名稱:laravel-googletagmanager,代碼行數:16,代碼來源:GoogleTagManagerMiddleware.php

示例6:

 /**
  * @param Store      $session
  * @param Collection $collection
  * @param Repository $config
  */
 function __construct(Store $session, Collection $collection, Repository $config)
 {
     // set configurable options
     $this->session_key = $config->get('augstudios.alerts.session_key', 'alerts');
     // initialize properties
     $this->session = $session;
     $this->prior = $this->session->get($this->session_key, clone $collection);
     $this->current = clone $collection;
 }
開發者ID:augstudios,項目名稱:alerts,代碼行數:14,代碼來源:SessionAlertsStore.php

示例7: message

 /**
  * @param        $message
  * @param string $level
  */
 public function message($message, $level = 'info')
 {
     $notification = new \stdClass();
     $notification->message = $message;
     $notification->level = $level;
     $notifications = $this->session->get('flash_notifications', []);
     array_push($notifications, $notification);
     $this->session->flash('flash_notifications', $notifications);
 }
開發者ID:ahk-ch,項目名稱:chamb.net,代碼行數:13,代碼來源:FlashNotifier.php

示例8: getRecentAuthData

 /**
  * Allows you retrieve the most recent social provider
  * authorized with.
  *
  * @return mixed
  */
 public function getRecentAuthData()
 {
     $providers = $this->session->get('__sp_auth.p');
     if (!$providers) {
         return null;
     }
     return array_first($providers, function ($provider) {
         return $provider === $this->session->get('__sp_auth.r');
     });
 }
開發者ID:morrelinko,項目名稱:laravel5-socialplus,代碼行數:16,代碼來源:SocialPlus.php

示例9: doAgegate

 /**
  * Processes the date of birth submitted in the age gate form
  */
 public function doAgegate()
 {
     $previousTooYoung = $this->session->get('laravel-avp.previous_too_young');
     if ($previousTooYoung) {
         return $this->{$redirector}->action('FWM\\LaravelAVP\\AVPController@agegate');
     }
     // Get the date of birth that the user submitted
     $dob = $this->handler->processDataOfBirth();
     return $this->validation->validate($dob);
 }
開發者ID:fastwebmedia,項目名稱:laravel-avp,代碼行數:13,代碼來源:AVPController.php

示例10: isRequired

 /**
  * Check if the reCAPTCHA is required
  *
  * @return bool Returns true if the captcha is required
  */
 public function isRequired()
 {
     if (!$this->config->get('larapress.settings.captcha.active')) {
         return false;
     }
     $timer = $this->config->get('larapress.settings.captcha.timer');
     if ($this->helpers->getCurrentTimeDifference($this->session->get('captcha.passed.time', 0), 'm') >= $timer) {
         return true;
     }
     return false;
 }
開發者ID:LaraGit,項目名稱:larapress,代碼行數:16,代碼來源:Captcha.php

示例11: Collection

 /**
  * Create a new flash notifier instance.
  *
  * @param Store       $session
  * @param Application $app
  */
 function __construct(Store $session, Application $app)
 {
     $this->session = $session;
     $this->app = $app;
     $this->messages = $this->session->pull('__messages', new Collection());
     if ($this->session->has('errors')) {
         $errors = $this->session->get('errors')->getBag('default')->getMessages();
         foreach ($errors as $error) {
             $this->add(['message' => current($error), 'type' => 'info', 'class' => 'warning'], false);
         }
     }
 }
開發者ID:portonefive,項目名稱:essentials,代碼行數:18,代碼來源:MessageManager.php

示例12: __construct

 public function __construct(Store $session, Factory $view)
 {
     $this->session = $session;
     $view->share('flash', $this);
     if ($this->session->has($this->namespace)) {
         $flashed = $this->session->get($this->namespace);
         $this->message = $flashed['message'];
         $this->title = $flashed['title'];
         $this->type = $flashed['type'];
         $this->exists = true;
     }
 }
開發者ID:willishq,項目名稱:laravel5-flash,代碼行數:12,代碼來源:Flash.php

示例13: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Closure $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     $containers = $this->session->get($this->key, []);
     if (count($containers) > 0) {
         foreach ($containers as $name => $messages) {
             /** @var \Krucas\Notification\Message $message */
             foreach ($messages as $message) {
                 $this->notification->container($name)->add($message->getType(), $message, false);
             }
         }
     }
     $this->session->forget($this->key);
     return $next($request);
 }
開發者ID:areyi,項目名稱:notification,代碼行數:21,代碼來源:NotificationMiddleware.php

示例14: handle

 /**
  * Handle user logged in.
  *
  * @param  \Illuminate\Contracts\Auth\Authenticatable  $user
  *
  * @return bool|null
  */
 public function handle(Authenticatable $user)
 {
     $social = $this->session->get('authentication.social.oauth');
     if (is_null($social)) {
         return;
     }
     $model = User::where('provider', '=', $social['provider'])->where('uid', '=', $social['user']->getId())->first();
     if (is_null($model)) {
         return;
     }
     $model->setAttribute('user_id', $user->getAuthIdentifier());
     $model->save();
     return true;
 }
開發者ID:vitalysemenov,項目名稱:oauth,代碼行數:21,代碼來源:UserLoggedIn.php

示例15: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Closure $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     $containerNames = $this->session->get($this->sessionPrefix . 'containers', array());
     $sessionVariables = $this->session->all();
     foreach ($containerNames as $containerName) {
         foreach ($sessionVariables as $sessionKey => $value) {
             if (strpos($sessionKey, $this->sessionPrefix . $containerName) === 0 && is_string($value)) {
                 $jsonMessage = json_decode($value);
                 $this->notification->container($containerName)->add($jsonMessage->type, new Message($jsonMessage->type, $jsonMessage->message, false, $jsonMessage->format, $jsonMessage->alias, $jsonMessage->position), false);
             }
         }
     }
     return $next($request);
 }
開發者ID:hanxiansen,項目名稱:laravel-5-blog,代碼行數:21,代碼來源:NotificationMiddleware.php


注:本文中的Illuminate\Session\Store::get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。