1 <?php
2 /**
3 * @package Joomla.Platform
4 * @subpackage Document
5 *
6 * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE
8 */
9
10 defined('JPATH_PLATFORM') or die;
11
12 /**
13 * DocumentRAW class, provides an easy interface to parse and display raw output
14 *
15 * @since 11.1
16 */
17 class JDocumentRaw extends JDocument
18 {
19 /**
20 * Class constructor
21 *
22 * @param array $options Associative array of options
23 *
24 * @since 11.1
25 */
26 public function __construct($options = array())
27 {
28 parent::__construct($options);
29
30 // Set mime type
31 $this->_mime = 'text/html';
32
33 // Set document type
34 $this->_type = 'raw';
35 }
36
37 /**
38 * Render the document.
39 *
40 * @param boolean $cache If true, cache the output
41 * @param array $params Associative array of attributes
42 *
43 * @return The rendered data
44 *
45 * @since 11.1
46 */
47 public function render($cache = false, $params = array())
48 {
49 parent::render();
50
51 return $this->getBuffer();
52 }
53 }
54