/**
  * @param ServerRequestInterface $request
  * @param ResponseInterface $response
  * @param callable $next
  * @return ResponseInterface
  */
 public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)
 {
     // get response
     $response = $next($request, $response);
     // Save statistics after all manipulations
     //count_all($this->config->cfg('goto'));
     save_visitors();
     if (!$this->config->configExists('main', 'count_referers') || $this->config->cfg('main', 'count_referers') == 1) {
         save_referer();
     }
     return $response;
 }
Esempio n. 2
0
 /**
  * @param $string
  * @return mixed
  */
 function applyFunctions($string)
 {
     global $NAV, $SNP, $APP;
     // init globals
     $NAV = array();
     $SNP = array();
     $APP = $this->applets;
     return tpl_functions($string, $this->config->cfg('system', 'var_loop'), array(), true);
 }