/**
* Create a document object
*
* @return Document object
*
* @see Document
* @since 1.7.0
* @deprecated 5.0 Load the document service from the dependency injection container or via $app->getDocument()
*/
protected static function createDocument()
{
@trigger_error(sprintf('%1$s() is deprecated. Load the document from the dependency injection container or via %2$s::getApplication()->getDocument().', __METHOD__, __CLASS__), E_USER_DEPRECATED);
$lang = self::getLanguage();
$input = self::getApplication()->input;
$type = $input->get('format', 'html', 'cmd');
$version = new Version();
$attributes = array('charset' => 'utf-8', 'lineend' => 'unix', 'tab' => "\t", 'language' => $lang->getTag(), 'direction' => $lang->isRtl() ? 'rtl' : 'ltr', 'mediaversion' => $version->getMediaVersion());
return self::getContainer()->get(FactoryInterface::class)->createDocument($type, $attributes);
}