Exemple #1
0
 private function provideConnection()
 {
     $curlOptions = $this->injector->getParameter('CurlConnection.options');
     $connection = new connection\CurlConnection($curlOptions, FajrUtils::getCookieFile());
     $connection = $this->statistics->hookRawConnection($connection);
     $connection = new connection\GzipDecompressingConnection($connection, FajrConfig::getDirectory('Path.Temporary'));
     $connection = new connection\AIS2ErrorCheckingConnection($connection);
     return $this->statistics->hookFinalConnection($connection);
 }
Exemple #2
0
 private function provideConnection()
 {
     $connection = new connection\CurlConnection(FajrUtils::getCookieFile());
     $this->rawStatsConnection = new connection\StatsConnection($connection, new SystemTimer());
     $connection = new connection\GzipDecompressingConnection($this->rawStatsConnection, FajrConfig::getDirectory('Path.Temporary'));
     $connection = new connection\AIS2ErrorCheckingConnection($connection);
     $this->statsConnection = new connection\StatsConnection($connection, new SystemTimer());
     return $this->statsConnection;
 }