/** * Class constructor * * @param array $options Associative array of attributes * * @since 11.1 */ public function __construct($options = array()) { parent::__construct($options); // Set mime type $this->_mime = 'text/html'; // Set document type $this->_type = 'html'; $doc = \JFactory::getDocument(); $this->_scripts = $doc->_scripts; $this->_styleSheets = $doc->_styleSheets; $version = new \JVersion(); $this->mediaVersion = $version->getMediaVersion(); }
/** * Create a document object * * @return JDocument object * * @see JDocument * @since 11.1 */ protected static function createDocument() { $lang = self::getLanguage(); $input = self::getApplication()->input; $type = $input->get('format', 'html', 'word'); $version = new JVersion(); $attributes = array('charset' => 'utf-8', 'lineend' => 'unix', 'tab' => ' ', 'language' => $lang->getTag(), 'direction' => $lang->isRtl() ? 'rtl' : 'ltr', 'mediaversion' => $version->getMediaVersion()); return JDocument::getInstance($type, $attributes); }