Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Commit

Permalink
adding DebugResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
Joan Fabrégat committed Mar 4, 2018
1 parent 80452fd commit adcb306
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codeinchq/lib-psr7responses",
"version": "1.1.8",
"version": "1.1.9",
"description": "A collection of PSR-7 responses",
"homepage": "https://github.com/codeinchq/lib-psr7responses",
"type": "library",
Expand Down
49 changes: 49 additions & 0 deletions src/DebugResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
//
// +---------------------------------------------------------------------+
// | CODE INC. SOURCE CODE |
// +---------------------------------------------------------------------+
// | Copyright (c) 2017 - Code Inc. SAS - All Rights Reserved. |
// | Visit https://www.codeinc.fr for more information about licensing. |
// +---------------------------------------------------------------------+
// | NOTICE: All information contained herein is, and remains the |
// | property of Code Inc. SAS. The intellectual and technical concepts |
// | contained herein are proprietary to Code Inc. SAS are protected by |
// | trade secret or copyright law. Dissemination of this information or |
// | reproduction of this material is strictly forbidden unless prior |
// | written permission is obtained from Code Inc. SAS. |
// +---------------------------------------------------------------------+
//
// Author: Joan Fabrégat <[email protected]>
// Date: 04/03/2018
// Time: 11:55
// Project: lib-psr7responses
//
declare(strict_types = 1);
namespace CodeInc\Psr7Responses;


/**
* Class DebugResponse
*
* @package CodeInc\Psr7Responses
* @author Joan Fabrégat <[email protected]>
*/
class DebugResponse extends HtmlResponse {
/**
* DebugResponse constructor.
*
* @param $debugInfos
* @param null|string $charset
* @param int $status
* @param array $headers
* @param string $version
* @param null|string $reason
*/
public function __construct($debugInfos, ?string $charset = null, int $status = 200, array $headers = [], string $version = '1.1', ?string $reason = null)
{
ob_start();
var_dump($debugInfos);
parent::__construct(ob_get_clean(), $charset, $status, $headers, $version, $reason);
}
}

0 comments on commit adcb306

Please sign in to comment.