Example #1
0
 public function executeFilter(HttpRequestInterface $request, HttpResponseInterface $response)
 {
     // take the initiative or pass through (do nothing)
     if (isset($this->config['statistics']['enabled']) and $this->config['statistics']['enabled'] === 1) {
         return;
     }
     // @todo aquire pieces of informtion from current visitor
     // Determine the client's browser and system information based on
     // $_SERVER['HTTP_USER_AGENT']
     /*
      * The Who logics, must be processed in a seperate filter
      */
     Doctrine::getTable('CsStatistic')->deleteWhoEntriesOlderThen($this->statsWhoDeleteTime);
     $this->updateStatistics($request->getRemoteAddress());
     $this->updateWhoTables($request->getRemoteAddress(), $request->getRequestURI());
 }
Example #2
0
File: Router.php Project: ksst/kf
 /**
  * Constructor.
  */
 public function __construct(HttpRequestInterface $request)
 {
     $this->request = $request;
     // get URI from request, clean it and set it as a class property
     $this->uri = self::prepareRequestURI($request->getRequestURI());
 }