/** * * @param string $search_domain_uri * @param iLift_HTTP $http_interface */ public function __construct($http_interface, $document_endpoint, $search_endpoint, $version = null) { if (is_null($version)) { $version = Lift_Search::api_version(); } $this->http_interface = $http_interface; $this->submission_uri = sprintf('http://%s/%s/documents/batch', $document_endpoint, $version); $this->search_uri = sprintf('http://%s/%s/search?', $search_endpoint, $version); }
public static function _print_api_nag() { $api_version = Lift_Search::api_version(); $search_domain = Lift_Search::get_search_domain_name(); if (!$search_domain) { return false; } elseif (!strtotime($api_version) || date('Y', strtotime($api_version)) <= 2011) { ?> <div class="error"><p>Your search domain is using a deprecated version of the API. Please consider updating to the new version by following these <a target="_BLANK" href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/migrating.html"><strong>instructions</strong></strong></a>.</p></div> <?php } }
public function __construct($credentials, $http_interface, $region = false) { $this->key = $credentials['access-key-id']; $this->secret_key = $credentials['secret-access-key']; $this->http_interface = $http_interface; $this->api_version = Lift_Search::api_version(); if ($region) { $this->endpoint = str_replace('us-east-1', $region, $this->endpoint); $this->region = $region; } }