当前位置: 首页>>代码示例>>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;未经允许,请勿转载。