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


PHP Request::input方法代码示例

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


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

示例1: handleRequest

 protected function handleRequest(Request $request)
 {
     $fid = \Route::input('id');
     $this->forum = Forum::with('perms')->findOrFail($fid);
     $this->subject = $request->input('req_subject');
     $this->message = $request->input('req_message');
 }
开发者ID:imihael,项目名称:fluxbb-core,代码行数:7,代码来源:NewTopic.php

示例2: getCurrentPage

 /**
  * Get the number of the current page.
  *
  * @return int
  */
 public function getCurrentPage()
 {
     $page = (int) $this->currentPage ?: $this->request->input($this->pageName, 1);
     if ($page < 1 || filter_var($page, FILTER_VALIDATE_INT) === false) {
         return 1;
     }
     return $page;
 }
开发者ID:nova-framework,项目名称:cms,代码行数:13,代码来源:Factory.php

示例3: getCode

 /**
  * Get the code from the request.
  *
  * @return string
  */
 protected function getCode()
 {
     return $this->request->input('code');
 }
开发者ID:suifengtec,项目名称:wechat,代码行数:9,代码来源:Client.php

示例4: handleRequest

 protected function handleRequest(Request $request)
 {
     $this->credentials = array('username' => $request->input('req_username'), 'password' => $request->input('req_password'));
     $this->remember = $request->input('remember');
 }
开发者ID:imihael,项目名称:fluxbb-core,代码行数:5,代码来源:Login.php

示例5: getOAuth2Code

 /**
  * {@inheritDoc}
  */
 public function getOAuth2Code()
 {
     return $this->request->input('code');
 }
开发者ID:sohailaammarocs,项目名称:lfc,代码行数:7,代码来源:IlluminateRequestProvider.php

示例6: handleRequest

 protected function handleRequest(Request $request)
 {
     $pid = \Route::input('id');
     $this->post = Post::with('author', 'topic')->findOrFail($pid);
     $this->message = $request->input('req_message');
 }
开发者ID:imihael,项目名称:fluxbb-core,代码行数:6,代码来源:EditPost.php

示例7: handleRequest

 protected function handleRequest(Request $request)
 {
     $this->input = $request->input();
     $this->request = $request;
 }
开发者ID:imihael,项目名称:fluxbb-core,代码行数:5,代码来源:Register.php

示例8: postConfigs

 public function postConfigs(Request $request)
 {
     $input = $request->input();
     if (!isset($input['configs'])) {
         throw new BadRequestHttpException();
     }
     foreach ($input['configs'] as $config) {
         if (!isset($config['name']) || !isset($config['value'])) {
             throw new BadRequestHttpException();
         }
     }
     foreach ($input['configs'] as $config) {
         if ($config['value'] === "NULL") {
             $config['value'] = null;
         }
         if (isset($this->configs_validate[$config['name']])) {
             $validator = Validator::make([$config['name'] => $config['value']], [$config['name'] => $this->configs_validate[$config['name']]]);
             if ($validator->fails()) {
                 return Response::json($validator->errors()->all(), 400);
             }
         }
         $rules = [];
         foreach ($this->configs_validate as $k => $v) {
             if (substr($k, 0, strlen($config['name'] . '.')) == $config['name'] . '.') {
                 $rules[$k] = $v;
             }
         }
         if (!empty($rules)) {
             $validator = Validator::make([$config['name'] => $config['value']], $rules);
             if ($validator->fails()) {
                 return Response::json($validator->errors()->all(), 400);
             }
         }
         $this->write_config($config['name'], $config['value']);
     }
 }
开发者ID:laravel-noobs,项目名称:userconfig,代码行数:36,代码来源:DefinesConfigs.php

示例9: handleRequest

 protected function handleRequest(Request $request)
 {
     $tid = \Route::input('id');
     $this->topic = Topic::with('forum.perms')->findOrFail($tid);
     $this->message = $request->input('req_message');
 }
开发者ID:imihael,项目名称:fluxbb-core,代码行数:6,代码来源:Reply.php


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