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


PHP Response::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($content = '', $status = 200, $headers = [])
 {
     $this->original = $content;
     parent::__construct($content, $status, $headers);
     $this->header('Content-Type', 'application/json');
     $this->content->update();
 }
开发者ID:breachofmind,项目名称:birdmin,代码行数:7,代码来源:RESTResponse.php

示例2: __construct

 public function __construct($data = null, $status = 200, array $headers = [])
 {
     parent::__construct('', $status, $headers);
     $this->headers->set('Content-Type', 'application/vnd.api+json');
     $this->content = new Document();
     $this->content->setData($data);
 }
开发者ID:Qiang1234,项目名称:core,代码行数:7,代码来源:JsonApiResponse.php

示例3: __construct

 public function __construct($filePath)
 {
     parent::__construct();
     if (!File::isFile($filePath)) {
         throw new Exception("Cannot read file: {$filePath}");
     }
     $fileContent = file_get_contents($filePath);
     $this->setContent($fileContent);
     $lastModified = new DateTime();
     $lastModified->setTimestamp(File::lastModified($filePath));
     $this->setLastModified($lastModified);
     $this->isNotModified(App::make('request'));
 }
开发者ID:natharduini,项目名称:laravel-js-localization,代码行数:13,代码来源:StaticFileResponse.php

示例4: __construct

 public function __construct($data, $status)
 {
     $this->json = $data;
     parent::__construct('', $status);
 }
开发者ID:efrane,项目名称:transfugio,代码行数:5,代码来源:WebView.php

示例5: __construct

 /**
  * Create a new response instance.
  *
  * @param mixed                          $content
  * @param int                            $status
  * @param array                          $headers
  * @param \Dingo\Api\Transformer\Binding $binding
  *
  * @return void
  */
 public function __construct($content, $status = 200, $headers = [], Binding $binding = null)
 {
     parent::__construct($content, $status, $headers);
     $this->binding = $binding;
 }
开发者ID:JamesGuthrie,项目名称:api,代码行数:15,代码来源:Response.php

示例6: __construct

 public function __construct($invoice)
 {
     parent::__construct("INVOICE={$invoice}:STATUS=ERR\n");
 }
开发者ID:bvangelov,项目名称:epay-service,代码行数:4,代码来源:InvoiceErrorResponse.php

示例7: __construct

 public function __construct($content = '', $status = 200, $headers = array())
 {
     parent::__construct($content, $status, $headers);
     $this->_contents = array('href' => $this->_getRequestUri(), 'time' => time(), 'statusCode' => $status, 'responseId' => md5(time()), 'ip' => $this->_getIP(), 'app' => \Config::get('app.name', 'none'), 'error' => NULL);
 }
开发者ID:rbmowatt,项目名称:alohalbi.surf,代码行数:5,代码来源:ApiResponse.php

示例8: __construct

 public function __construct($content, $status, array $headers = [])
 {
     parent::__construct($content, $status, $headers);
 }
开发者ID:garrinar,项目名称:laravel,代码行数:4,代码来源:BaseResponse.php

示例9: __construct

 /**
  * @param string $content
  * @param int    $status
  * @param array  $headers
  */
 public function __construct($content = '', $status = 200, $headers = [])
 {
     parent::__construct($content, $status, $headers);
     $this->prepareResponse();
 }
开发者ID:vanchelo,项目名称:laravel-custom-responses,代码行数:10,代码来源:Response.php

示例10: __construct

 public function __construct()
 {
     parent::__construct('ERR=Not valid CHECKSUM\\n');
 }
开发者ID:bvangelov,项目名称:epay-service,代码行数:4,代码来源:NotValidChecksumResponse.php


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