Stub out the OutputFilter
[hoplite.git] / http / response.php
1 <?php
2 // Hoplite
3 // Copyright (c) 2011 Blue Static
4 //
5 // This program is free software: you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License as published by the Free
7 // Software Foundation, either version 3 of the License, or any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT
10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 // more details.
13 //
14 // You should have received a copy of the GNU General Public License along with
15 // this program. If not, see <http://www.gnu.org/licenses/>.
16
17 namespace hoplite\http;
18
19 require_once HOPLITE_ROOT . 'base/strict_object.php';
20 require_once HOPLITE_ROOT . 'http/response_code.php';
21
22 /*!
23 A Response holds data processed by Action objects. When the RootController is
24 Run(), a Response object is created. This response is used for any subsequent
25 chained Actions. After processing, the OutputFilter will take the data and
26 formulate the actual HTTP response body.
27 */
28 class Response extends \hoplite\base\StrictObject
29 {
30 /*! @var integer The HTTP response code to return. */
31 public $response_code = ResponseCode::OK;
32
33 /*! @var array A map of headers to values to be sent with the response. */
34 public $headers = array();
35
36 /*! @var string Raw HTTP response body. */
37 public $body = '';
38
39 /*! @var array Context data that is not sent to the output filter but is used
40 to store application-specific information between Actions.
41 */
42 public $context = array();
43
44 /*! @var array Model data. */
45 public $data = array();
46 }