2009-05-27 22:47:11 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2017-05-30 13:31:52 +00:00
|
|
|
* Joomla! Content Management System
|
2011-05-11 01:39:32 +00:00
|
|
|
*
|
2019-03-09 10:20:38 +00:00
|
|
|
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
2017-05-30 13:31:52 +00:00
|
|
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
2009-05-27 22:47:11 +00:00
|
|
|
*/
|
|
|
|
|
2017-05-30 13:31:52 +00:00
|
|
|
namespace Joomla\CMS\Document;
|
|
|
|
|
2019-09-03 08:36:54 +00:00
|
|
|
\defined('JPATH_PLATFORM') or die;
|
2009-05-27 22:47:11 +00:00
|
|
|
|
|
|
|
/**
|
2017-05-31 18:00:29 +00:00
|
|
|
* RawDocument class, provides an easy interface to parse and display raw output
|
2009-05-27 22:47:11 +00:00
|
|
|
*
|
2018-10-14 21:33:48 +00:00
|
|
|
* @since 1.7.0
|
2009-05-27 22:47:11 +00:00
|
|
|
*/
|
2017-05-31 18:00:29 +00:00
|
|
|
class RawDocument extends Document
|
2009-05-27 22:47:11 +00:00
|
|
|
{
|
|
|
|
/**
|
2011-05-11 01:39:32 +00:00
|
|
|
* Class constructor
|
2009-05-27 22:47:11 +00:00
|
|
|
*
|
2011-05-11 01:39:32 +00:00
|
|
|
* @param array $options Associative array of options
|
2011-07-16 02:35:03 +00:00
|
|
|
*
|
2018-10-14 21:33:48 +00:00
|
|
|
* @since 1.7.0
|
2009-05-27 22:47:11 +00:00
|
|
|
*/
|
2011-05-13 09:46:03 +00:00
|
|
|
public function __construct($options = array())
|
2009-05-27 22:47:11 +00:00
|
|
|
{
|
|
|
|
parent::__construct($options);
|
|
|
|
|
2012-06-03 06:10:22 +00:00
|
|
|
// Set mime type
|
2009-05-27 22:47:11 +00:00
|
|
|
$this->_mime = 'text/html';
|
|
|
|
|
2012-06-03 06:10:22 +00:00
|
|
|
// Set document type
|
2009-05-27 22:47:11 +00:00
|
|
|
$this->_type = 'raw';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Render the document.
|
|
|
|
*
|
2011-07-16 02:35:03 +00:00
|
|
|
* @param boolean $cache If true, cache the output
|
|
|
|
* @param array $params Associative array of attributes
|
2011-05-11 01:39:32 +00:00
|
|
|
*
|
2017-07-26 15:32:25 +00:00
|
|
|
* @return string The rendered data
|
2011-07-16 02:35:03 +00:00
|
|
|
*
|
2018-10-14 21:33:48 +00:00
|
|
|
* @since 1.7.0
|
2009-05-27 22:47:11 +00:00
|
|
|
*/
|
2011-05-11 01:39:32 +00:00
|
|
|
public function render($cache = false, $params = array())
|
2009-05-27 22:47:11 +00:00
|
|
|
{
|
2019-12-05 08:53:32 +00:00
|
|
|
parent::render($cache, $params);
|
2014-10-11 17:37:44 +00:00
|
|
|
|
2009-05-27 22:47:11 +00:00
|
|
|
return $this->getBuffer();
|
|
|
|
}
|
2011-10-13 09:23:26 +00:00
|
|
|
}
|