<commit_before><?php
/**
 * Simple Router
 * 
 * This source file is subject to the MIT license that is bundled
 * with this package in the file LICENSE.txt.
 *
 * @category   Spark
 * @package    Spark_HttpResponse
 * @author     <NAME> <<EMAIL>>
 * @copyright  Copyright (c) 2011 <NAME>
 * @license    MIT License
 */

namespace SparkCore;

class Response
{
    protected $headers = array();
    protected $body = "";
    protected $code = 200;
    protected $exception;
    protected $renderExceptions = true;

    function getCode()
    {
        return $this->code;
    }
    
    function setCode($code)
    {
        $this->code = $code;
        return $this;
    }

    function setException(\Exception $e) 
    {
        $this->exception = $e;
        return $this;
    }

    function renderExceptions($enabled = true)
    {
        $this->renderExceptions = $enabled;
        return $this;
    }

    function hasException()
    {
        return (null !== $this->exception);
    }

    function getException()
    {
        return $this->exception;
    }
    
    function statusCode($code = null) {
        if (null === $code) {
            return $this->code;
        }
        $this->setCode($code);
        return $this;<commit_msg>Started on new response<commit_after><?php
/**
 * Simple Router
 * 
 * This source file is subject to the MIT license that is bundled
 * with this package in the file LICENSE.txt.
 *
 * @category   Spark
 * @package    Spark_HttpResponse
 * @author     <NAME> <<EMAIL>>
 * @copyright  Copyright (c) 2011 <NAME>
 * @license    MIT License
 */

namespace SparkCore;

class Response
{
    protected $headers = array();
    protected $content = "";
    protected $status  = 200;

    function __construct($content = "", $status = 200, $headers)
    {
    }
    
    function statusCode($code = null) {
        if (null === $code) {
            return $this->code;
        }
        $this->setCode($code);
        return $this;
{'fraction_non_alphanumeric': 0.12392077196546471, 'fraction_numerical': 0.008633824276282377, 'mean_word_length': 2.218954248366013, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6508826', 'n_tokens_mistral': 601, 'n_tokens_neox': 571, 'n_words': 165}