當前位置: 首頁>>代碼示例>>PHP>>正文


PHP RedirectResponse::__construct方法代碼示例

本文整理匯總了PHP中Symfony\Component\HttpFoundation\RedirectResponse::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP RedirectResponse::__construct方法的具體用法?PHP RedirectResponse::__construct怎麽用?PHP RedirectResponse::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Symfony\Component\HttpFoundation\RedirectResponse的用法示例。


在下文中一共展示了RedirectResponse::__construct方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * @param Request $request
  * @param View $view
  * @param Session $session
  * @param array|string $url
  * @param int $status
  * @param array $headers
  */
 public function __construct(Request $request, View $view, Session $session, $url = ROOT, $status = 302, $headers = array())
 {
     $this->request = $request;
     $this->view = $view;
     $this->session = $session;
     parent::__construct($url, $status, $headers);
 }
開發者ID:jetfirephp,項目名稱:framework,代碼行數:15,代碼來源:Redirect.php

示例2: __construct

 /**
  * Creates a redirect response so that it conforms to the rules defined for a redirect status code.
  *
  * @param string  $url    The URL to redirect to
  * @param integer $status The status code (302 by default)
  * @param Cookie  $cookie An array of Cookie objects
  */
 public function __construct($url, $status = 302, $cookie = 'full')
 {
     parent::__construct($url, $status);
     if (!$cookie instanceof Cookie) {
         throw new \InvalidArgumentException(sprintf('Third parameter is not a valid Cookie object.'));
     }
     $this->headers->setCookie($cookie);
 }
開發者ID:juju95,項目名稱:MobileDetectBundle,代碼行數:15,代碼來源:RedirectResponseWithCookie.php

示例3: __construct

 /**
  * Creates a redirect response so that it conforms to the rules defined for a redirect status code.
  *
  * @param string  $url    The URL to redirect to
  * @param integer $status The status code (302 by default)
  * @param array   $cookies An array of Cookie objects
  */
 public function __construct($url, $status = 302, $cookies = array())
 {
     parent::__construct($url, $status);
     foreach ($cookies as $cookie) {
         if (!$cookie instanceof Cookie) {
             throw new \InvalidArgumentException(sprintf('One of third parameter array is not a valid Cookie object.'));
         }
         $this->headers->setCookie($cookie);
     }
 }
開發者ID:alterphp,項目名稱:components,代碼行數:17,代碼來源:RedirectResponseWithCookie.php

示例4: __construct

 /**
  * @param \Laelaps\Bundle\Facebook\FacebookAdapter $facebookAdapter
  * @param array $permissions
  */
 public function __construct(FacebookAdapter $facebookAdapter, array $permissions = [])
 {
     $redirectUrl = $facebookAdapter->getLoginUrl(['scope' => $permissions]);
     parent::__construct($redirectUrl);
 }
開發者ID:kl3ryk,項目名稱:symfony-facebook-authentication-bundle,代碼行數:9,代碼來源:FacebookLoginUrlRedirectResponse.php

示例5: __construct

 public function __construct($url, $status = 302, $headers = array())
 {
     $url = (string) $url;
     // sometimes we get an object.
     parent::__construct($url, $status, $headers);
 }
開發者ID:ceko,項目名稱:concrete5-1,代碼行數:6,代碼來源:RedirectResponse.php

示例6: __construct

 public function __construct(Request $request, $status = 302, $headers = [])
 {
     parent::__construct($request->headers->get('referer'), $status, $headers);
 }
開發者ID:mgugniewicz,項目名稱:dodajurlop,代碼行數:4,代碼來源:RefererRedirectResponse.php

示例7: __construct

 public function __construct($url, array $headers = [])
 {
     parent::__construct($url, self::HTTP_RESET_CONTENT, $headers);
 }
開發者ID:yed30,項目名稱:PlatformUIBundle,代碼行數:4,代碼來源:FormProcessingDoneResponse.php

示例8: __construct

 /**
  * Constructor
  *
  * @param string $url
  * @param int $session
  * @param array $paReq
  */
 public function __construct($url, $session, $paReq)
 {
     parent::__construct($url);
     $this->setPaReq($paReq);
     $this->setSession($session);
 }
開發者ID:digideskio,項目名稱:innovate,代碼行數:13,代碼來源:Redirect.php


注:本文中的Symfony\Component\HttpFoundation\RedirectResponse::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。