当前位置: 首页>>代码示例>>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;未经允许,请勿转载。