Your IP : 216.73.216.240


Current Path : /home/juvelize/saulnois/tmp/install_695d2cf0b4957/src/Controller/
Upload File :
Current File : /home/juvelize/saulnois/tmp/install_695d2cf0b4957/src/Controller/TfController.php

<?php
/*
* @package		Tech Fry Library
* @license		https://www.gnu.org/licenses/gpl-3.0.en.html
*/

namespace TechFry\Library\Controller;

defined('_JEXEC') or die;

use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Input\Input;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;

class TfController extends BaseController
{
    public $option;

    public $cparams;

    public $today;
    public $date_sql;
	public $date_unix;
	public $date_lc3;

    public $juser;
    public $user_levels;

    public $url;

	public $post;
	public $get;
    
    public function __construct($config = [], ?MVCFactoryInterface $factory = null, ?CMSApplication $app = null, ?Input $input = null)
	{
	    parent::__construct($config, $factory, $app, $input);
        // Available: $this->app, $this->input
        	    
        $this->option = $this->input->get('option');

        $this->today = Factory::getDate();
        $this->date_sql = $this->today->toSql();
		$this->date_unix = $this->today->toUnix();
		$this->date_lc3 = $this->today->format(Text::_('DATE_FORMAT_LC3'));

        $this->juser = $this->app->getIdentity();
        $this->user_levels = $this->juser->getAuthorisedViewLevels();

        $this->cparams = ComponentHelper::getParams($this->option);

        $this->url = Uri::getInstance()->toString();

		$this->post = $this->input->post->getArray();

		$this->get = $this->input->get->getArray();
	}

    /*
    default_view

    getModel(), setMessage(), setRedirect(), checkToken()
    */
}