user = Auth::getUser(); $this->user['money_aff'] = (float) $this->user['money_aff']; $this->antiXss = new AntiXSS(); } /** * Get smarty */ public function view(): Smarty { $this->view = View::getSmarty(); if (View::$connection) { $this->view->assign( 'queryLog', View::$connection ->connection('default') ->getQueryLog() )->assign( 'optTime', round((microtime(true) - View::$beginTime) * 1000, 2) ); } return $this->view; } /** * Get twig */ public function twig(): Environment { $this->twig = View::getTwig(); if (View::$connection) { $this->twig->addGlobal( 'queryLog', View::$connection ->connection('default') ->getQueryLog() ); $this->twig->addGlobal( 'optTime', round((microtime(true) - View::$beginTime) * 1000, 2) ); } return $this->twig; } }