當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。