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


PHP Session::all方法代码示例

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


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

示例1: getExceptionData

 private function getExceptionData($exception)
 {
     $data = [];
     $data['host'] = Request::server('HTTP_HOST');
     $data['method'] = Request::method();
     $data['fullUrl'] = Request::fullUrl();
     if (php_sapi_name() === 'cli') {
         $data['host'] = parse_url(config('app.url'), PHP_URL_HOST);
         $data['method'] = 'CLI';
     }
     $data['exception'] = $exception->getMessage();
     $data['error'] = $exception->getTraceAsString();
     $data['line'] = $exception->getLine();
     $data['file'] = $exception->getFile();
     $data['class'] = get_class($exception);
     $data['storage'] = array('SERVER' => Request::server(), 'GET' => Request::query(), 'POST' => $_POST, 'FILE' => Request::file(), 'OLD' => Request::hasSession() ? Request::old() : [], 'COOKIE' => Request::cookie(), 'SESSION' => Request::hasSession() ? Session::all() : [], 'HEADERS' => Request::header());
     $data['storage'] = array_filter($data['storage']);
     $count = $this->config['count'];
     $data['exegutor'] = [];
     $data['file_lines'] = [];
     $file = new SplFileObject($data['file']);
     for ($i = -1 * abs($count); $i <= abs($count); $i++) {
         list($line, $exegutorLine) = $this->getLineInfo($file, $data['line'], $i);
         $data['exegutor'][] = $exegutorLine;
         $data['file_lines'][$data['line'] + $i] = $line;
     }
     // to make Symfony exception more readable
     if ($data['class'] == 'Symfony\\Component\\Debug\\Exception\\FatalErrorException') {
         preg_match("~^(.+)' in ~", $data['exception'], $matches);
         if (isset($matches[1])) {
             $data['exception'] = $matches[1];
         }
     }
     return $data;
 }
开发者ID:Cherry-Pie,项目名称:LogEnvelope,代码行数:35,代码来源:LogEnvelope.php

示例2: new_page

 public function new_page()
 {
     $first = 'Aarooran';
     $last = 'Kanthasamy';
     //   Session::put('key',$first);
     dd(Session::all());
     return view('check');
 }
开发者ID:Aaroor,项目名称:laravel,代码行数:8,代码来源:PagesController.php

示例3: store

 public function store($id)
 {
     $game = $this->gameRepository->getWithId($id);
     Session::put($game->id, $game);
     //session()->get('');
     // ::has('') ::get('') ::all()
     $games = Session::all();
     return view('pages.cart', compact('games'));
 }
开发者ID:polytechlyon-isi2,项目名称:Instant-Play,代码行数:9,代码来源:CartController.php

示例4: postPayment

 public function postPayment()
 {
     $payer = new Payer();
     $payer->setPaymentMethod('paypal');
     $item_1 = new Item();
     $item_1->setName('Item 1')->setCurrency('USD')->setQuantity(2)->setPrice('150');
     // unit price
     $item_2 = new Item();
     $item_2->setName('Item 2')->setCurrency('USD')->setQuantity(4)->setPrice('70');
     $item_3 = new Item();
     $item_3->setName('Item 3')->setCurrency('USD')->setQuantity(1)->setPrice('20');
     // add item to list
     $item_list = new ItemList();
     $item_list->setItems(array($item_1, $item_2, $item_3));
     $amount = new Amount();
     $amount->setCurrency('USD')->setTotal(580);
     $transaction = new Transaction();
     $transaction->setAmount($amount)->setItemList($item_list)->setDescription('Your transaction description');
     $redirect_urls = new RedirectUrls();
     $redirect_urls->setReturnUrl(URL::route('payment.status'))->setCancelUrl(URL::route('payment.status'));
     $payment = new Payment();
     $payment->setIntent('Sale')->setPayer($payer)->setRedirectUrls($redirect_urls)->setTransactions(array($transaction));
     try {
         $payment->create($this->_api_context);
         //            echo'hello';
         //            print_r($test);die;
     } catch (\PayPal\Exception\PPConnectionException $ex) {
         if (\Config::get('app.debug')) {
             echo "Exception: " . $ex->getMessage() . PHP_EOL;
             $err_data = json_decode($ex->getData(), true);
             exit;
         } else {
             die('Some error occur, sorry for inconvenient');
         }
     }
     if (is_array($payment->getLinks()) || is_object($payment->getLinks())) {
         foreach ($payment->getLinks() as $link) {
             echo 'reached';
             if ($link->getRel() == 'approval_url') {
                 $redirect_url = $link->getHref();
                 break;
             }
         }
     }
     // add payment ID to session
     Session::put('paypal_payment_id', $payment->getId());
     dd(Session::all());
     if (isset($redirect_url)) {
         // redirect to paypal
         return Redirect::away($redirect_url);
     }
     return Redirect::route('original.route')->with('error', 'Unknown error occurred');
 }
开发者ID:sumitglobussoft,项目名称:INSTAGRAM-PANEL,代码行数:53,代码来源:PaypalController.php

示例5: logRequest

 /**
  * Logs an API request
  *
  * @param \Illuminate\Http\Request $request     The request
  * @param array                    $sessionData User session data, if any
  *
  * @return bool
  */
 public function logRequest(Request $request, $sessionData = [])
 {
     try {
         //  Get some session data if none given, then remove any unmentionables...
         if (empty($sessionData) || !is_array($sessionData)) {
             /** @noinspection PhpUndefinedMethodInspection */
             $sessionData = Session::all();
         }
         array_forget($sessionData, ['_token', 'token', 'api_key', 'session_token', 'metadata']);
         $_cluster = Cluster::service();
         //  Add in stuff for API request logging
         $this->log(['dfe' => $this->prepareMetadata($_cluster->getInstanceName(), $request, $_cluster->getConfig('audit', [])), 'user' => $sessionData], AuditLevels::INFO, $request, $_cluster->getClusterId());
     } catch (\Exception $_ex) {
         //  Completely ignore any issues
     }
 }
开发者ID:rajeshpillai,项目名称:df-managed,代码行数:24,代码来源:AuditingService.php

示例6: register

 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app->after(function ($request, $response) {
         $session = Session::all();
         unset($session['_token']);
         $empty_flash = true;
         if (isset($session['flash'])) {
             if (is_array($session['flash']['old']) && count($session['flash']['old']) > 0) {
                 $empty_flash = false;
             }
             if (is_array($session['flash']['new']) && count($session['flash']['new']) > 0) {
                 $empty_flash = false;
             }
         }
         if ($empty_flash) {
             unset($session['flash']);
         }
         if (count($session) >= 1) {
             return;
         }
         $response->headers->set('X-No-Session', 'yeah');
     });
 }
开发者ID:andresnijder,项目名称:sessionmonster,代码行数:28,代码来源:SessionMonsterServiceProvider.php

示例7: session_all

 public function session_all()
 {
     $value = Session::all();
     return $value;
 }
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:5,代码来源:UserManager.php

示例8: doCreateField

 protected function doCreateField($table_name, $field_name)
 {
     $field_bd = $this->getAttribute('field');
     $data = Session::all();
     if (!Session::has($table_name . '.' . $field_name)) {
         if ($field_bd && !Schema::hasColumn($table_name, $field_name)) {
             Session::push($table_name . '.' . $field_name, 'created');
             @(list($field, $param) = explode("|", $field_bd));
             Schema::table($table_name, function ($table) use($field_name, $field, $param) {
                 $field_add = $table->{$field}($field_name);
                 if ($param) {
                     $field_add->length($param);
                 }
             });
         } else {
             Session::push($table_name . '.' . $field_name, 'created');
         }
     }
 }
开发者ID:arturishe21,项目名称:buider,代码行数:19,代码来源:AbstractField.php

示例9: seesess

 public function seesess()
 {
     return dd(Session::all());
 }
开发者ID:iandberg,项目名称:laravel_webstore,代码行数:4,代码来源:CartItemsController.php

示例10: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(Request $request)
 {
     dd($request->all());
     Session::put('fname', 'hasha');
     dd(Session::all());
 }
开发者ID:colinwait,项目名称:test,代码行数:11,代码来源:MyController.php

示例11: getAll

 /**
  * Get all key-value pairs from storage.
  *
  * @return array
  */
 public function getAll()
 {
     return Session::all();
 }
开发者ID:parziphal,项目名称:parse,代码行数:9,代码来源:SessionStorage.php

示例12: assertSessionHasNoFlashData

 protected function assertSessionHasNoFlashData()
 {
     $all_session = Session::all();
     $this->assertFalse(isset($all_session['flash']));
 }
开发者ID:yoganandgopalan,项目名称:InventoryCarShowroom,代码行数:5,代码来源:GregWarCaptchaValidatorTest.php

示例13: dump

 public function dump()
 {
     dd(Session::all());
 }
开发者ID:kevin-ngn,项目名称:l5.2multiauth,代码行数:4,代码来源:GuestController.php


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