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


PHP Request::__construct方法代码示例

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


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

示例1: __construct

 public function __construct(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null)
 {
     parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content);
     $this->runMultiLanguage();
     $this->runPathBinding();
     $this->loadTrustedProxies();
 }
开发者ID:phpffcms,项目名称:ffcms-core,代码行数:7,代码来源:Request.php

示例2: __construct

 /**
  * @param Request $originalRequest
  * @param string  $pagePath
  * @param integer $pageDefaultValue
  * @param string  $maxResultsPath
  * @param integer $maxResultsDefaultValue
  *
  * @return PaginatedRequest
  */
 public function __construct(Request $originalRequest, $pagePath, $pageDefaultValue, $maxResultsPath, $maxResultsDefaultValue)
 {
     parent::__construct($originalRequest->query->all(), $originalRequest->request->all(), $originalRequest->attributes->all(), $originalRequest->cookies->all(), $originalRequest->files->all(), $originalRequest->server->all(), $originalRequest->getContent());
     $this->pagePath = $pagePath;
     $this->pageDefaultValue = $pageDefaultValue;
     $this->maxResultsPath = $maxResultsPath;
     $this->maxResultsDefaultValue = $maxResultsDefaultValue;
 }
开发者ID:kieranbamforth,项目名称:paginator-bundle,代码行数:17,代码来源:PaginatedRequest.php

示例3: __construct

 /**
  * Constructor.
  * 
  * Automatically translates JSON raw post data into post parameters.
  */
 public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
 {
     parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content);
     $rawPost = $this->getContent();
     if (!empty($rawPost)) {
         if (stripos($this->headers->get('Content-Type'), 'application/json') === 0) {
             $post = json_decode($rawPost, true);
             if ($post && is_array($post)) {
                 $this->request->add($post);
             }
         }
     }
 }
开发者ID:splot,项目名称:framework,代码行数:18,代码来源:Request.php

示例4: __construct

 public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
 {
     parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content);
 }
开发者ID:cvele,项目名称:fondacija,代码行数:4,代码来源:Request.php

示例5: __construct

 /**
  * @param BaseRequest $request
  */
 public function __construct(BaseRequest $request)
 {
     parent::__construct(iterator_to_array($request->query), iterator_to_array($request->request), iterator_to_array($request->attributes), iterator_to_array($request->cookies), iterator_to_array($request->files), iterator_to_array($request->server), $request->getContent());
 }
开发者ID:phprest,项目名称:phprest,代码行数:7,代码来源:Request.php

示例6: __construct

 /**
  * @inheritdoc
  */
 public function __construct(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null)
 {
     parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content);
     $this->setLocale($this->getPreferredLanguage());
 }
开发者ID:cubex,项目名称:framework,代码行数:8,代码来源:Request.php

示例7: __construct

 /**
  * The constructor. Sets up a standard request.
  */
 public function __construct()
 {
     //setup the standard request.
     parent::__construct($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);
 }
开发者ID:ua1-labs,项目名称:ulfberht-application,代码行数:8,代码来源:request.php

示例8: __construct

 /**
  * @param array $attributes
  * @param array $content
  */
 public function __construct(array $attributes, $content)
 {
     parent::__construct();
     $this->attributes = new ParameterBag($attributes);
     $this->content = $content;
 }
开发者ID:kleijnweb,项目名称:swagger-bundle,代码行数:10,代码来源:RequestProcessorTest.php

示例9: __construct

 public function __construct()
 {
     parent::__construct($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);
 }
开发者ID:jetfirephp,项目名称:http,代码行数:4,代码来源:Request.php

示例10: __construct

 /**
  * MockTokenRequest constructor.
  * @param $serialisedToken
  */
 public function __construct($serialisedToken)
 {
     parent::__construct();
     $this->headers->set('Authorization', $serialisedToken);
 }
开发者ID:clearbooks,项目名称:dilex-jwt,代码行数:9,代码来源:MockTokenRequest.php

示例11: __construct

 /**
  * Constructor.
  *
  * HTTP method overriding using the special `_method` parameter is enabled
  * by default in our Request object.
  *
  * @see \Symfony\Component\HttpFoundation\Request::__construct
  * @see \Symfony\Component\HttpFoundation\Request::enableHttpMethodParameterOverride
  */
 public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
 {
     parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content);
     self::enableHttpMethodParameterOverride();
 }
开发者ID:mothership-ec,项目名称:cog,代码行数:14,代码来源:Request.php

示例12: __construct

 /**
  * @TODO: remove dependency from Request object?
  *
  * @param Request $request source request
  * @param string $media
  */
 public function __construct(Request $request, $media = TemplateLayout::MEDIA_SCREEN)
 {
     parent::__construct($request->query->all(), $request->request->all(), $request->attributes->all(), $request->cookies->all(), $request->files->all(), $request->server->all(), $request->content);
     $this->setDefaultLocale($request->getLocale());
     $this->media = $media;
 }
开发者ID:sitesupra,项目名称:sitesupra,代码行数:12,代码来源:PageRequest.php

示例13: ParameterBag

 /**
  */
 function __construct()
 {
     parent::__construct();
     $this->attributes = new ParameterBag([RequestMeta::ATTRIBUTE_URI => '/uri']);
 }
开发者ID:kleijnweb,项目名称:swagger-bundle,代码行数:7,代码来源:RequestListenerTest.php


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