1 <?php
2 /* --------------------------------------------------------------
3 JsonHttpControllerResponse.inc.php 2015-03-12 gm
4 Gambio GmbH
5 http://www.gambio.de
6 Copyright (c) 2015 Gambio GmbH
7 Released under the GNU General Public License (Version 2)
8 [http://www.gnu.org/licenses/gpl-2.0.html]
9 --------------------------------------------------------------
10 */
11
12 MainFactory::load_class('HttpControllerResponse');
13
14 /**
15 * Class JsonHttpControllerResponse
16 *
17 * @category System
18 * @package Http
19 * @subpackage ValueObjects
20 * @extends HttpControllerResponse
21 */
22 class JsonHttpControllerResponse extends HttpControllerResponse
23 {
24 /**
25 * Initializes the json http controller response.
26 *
27 * @param array $contentArray Array which will be encoded in json format.
28 */
29 public function __construct(array $contentArray)
30 {
31 $this->httpBody = json_encode($contentArray);
32 }
33 }