本文整理汇总了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();
}
示例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);
}
示例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'));
}
示例4: __construct
public function __construct($data, $status)
{
$this->json = $data;
parent::__construct('', $status);
}
示例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;
}
示例6: __construct
public function __construct($invoice)
{
parent::__construct("INVOICE={$invoice}:STATUS=ERR\n");
}
示例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);
}
示例8: __construct
public function __construct($content, $status, array $headers = [])
{
parent::__construct($content, $status, $headers);
}
示例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();
}
示例10: __construct
public function __construct()
{
parent::__construct('ERR=Not valid CHECKSUM\\n');
}