You are here

public function GoogleMini::query in Google Search Appliance 5

Same name and namespace in other branches
  1. 6.2 GoogleMini.php \GoogleMini::query()
1 call to GoogleMini::query()
DrupalGoogleMini::query in ./DrupalGoogleMini.php
1 method overrides GoogleMini::query()
DrupalGoogleMini::query in ./DrupalGoogleMini.php

File

./GoogleMini.php, line 296

Class

GoogleMini

Code

public function query($iteratorClass = 'GoogleMiniResultIterator') {
  $query = $this
    ->buildQuery();

  // get search results in XML using cURL
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $query);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_VERBOSE, true);
  $resultXML = curl_exec($ch);
  if ($this->debug) {
    $this
      ->log('Made CURL request to ' . $query);
  }
  return self::resultFactory($resultXML, $iteratorClass);
}