Your IP : 216.73.216.240
<?php
/*
* @package Tech Fry Library
* @license https://www.gnu.org/licenses/gpl-3.0.en.html
*/
namespace TechFry\Library;
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Document\Document;
class TDocument
{
// type, charset, meta tags, language, direction, title
// script, style (use web asset manager)
public $jdoc; // Joomla Document Object
public function __construct()
{
$this->jdoc = Factory::getApplication()->getDocument();
}
public function get_type()
{
return $this->jdoc->getType(); // html
}
public function get_meta($name)
{
return $this->jdoc->getMetaData($name);
}
public function set_meta($name, $content)
{
return $this->jdoc->setMetaData($name, $content);
}
public function get_charset()
{
return $this->jdoc->getCharset(); // utf-8
}
public function get_language()
{
return $this->jdoc->getLanguage(); // en-gb
}
public function get_direction()
{
return $this->jdoc->getDirection(); // ltr
}
public function get_title()
{
return $this->jdoc->getTitle();
}
public function set_title($title)
{
return $this->jdoc->setTitle($title);
}
}