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