コード例 #1
0
 public function test_process_ShouldTrackAllSetRequests()
 {
     $this->assertSame(0, $this->tracker->getCountOfLoggedRequests());
     $this->requestSet->setRequests(array(array('idsite' => 1, 'url' => 'http://localhost/foo?bar'), array('idsite' => 1, 'url' => 'http://localhost')));
     $this->handler->process($this->tracker, $this->requestSet);
     $this->assertSame(2, $this->tracker->getCountOfLoggedRequests());
 }
コード例 #2
0
ファイル: Tracker.php プロジェクト: FluentDevelopment/piwik
 public function track(Handler $handler, RequestSet $requestSet)
 {
     if (!$this->shouldRecordStatistics()) {
         return;
     }
     $requestSet->initRequestsAndTokenAuth();
     if ($requestSet->hasRequests()) {
         $handler->onStartTrackRequests($this, $requestSet);
         $handler->process($this, $requestSet);
         $handler->onAllRequestsTracked($this, $requestSet);
     }
 }