/**
  * Get the API version this dataset is using
  *
  * @return int The API version number
  */
 public function getApiVersion()
 {
     // If we don't have the API version set, send a dummy query with limit 0 since we only care about the headers
     if ($this->apiVersion == 0) {
         $soql = new SoqlQuery();
         $soql->limit(0);
         // When we fetch a dataset, the API version is stored
         $this->getDataset($soql);
     }
     return $this->apiVersion;
 }
Exemple #2
0
 /**
  * @expectedException \OutOfBoundsException
  */
 public function testNegativeLimitQuery()
 {
     $limit = -10;
     $soql = new SoqlQuery();
     $soql->limit($limit);
 }