for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* HTTP\Response
*
* Core\HTTP Interfaces.
* @package core
* @author [email protected]
* @copyright Caffeina srl - 2015-2016 - http://caffeina.com
*/
namespace HTTP;
class Response {
public $status = 200,
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.
$headers = [],
$contents = '';
public function __construct($contents, $status, $headers){
$this->status = $status;
$this->contents = $contents;
$this->headers = (array)$headers;
}
public function __toString(){
return $this->contents;
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.