You are here

public function BiblioEntrezClient::setTool in Bibliography Module 6

Same name and namespace in other branches
  1. 6.2 modules/pubmed/EntrezClient.php \BiblioEntrezClient::setTool()
  2. 7 modules/pubmed/EntrezClient.php \BiblioEntrezClient::setTool()
  3. 7.2 modules/pubmed/EntrezClient.php \BiblioEntrezClient::setTool()

Sets a string identifying the resource.

A string with no internal spaces that identifies the resource which is using Entrez links (e.g., tool=flybase). This argument is used to help NCBI provide better service to third parties generating Entrez queries from programs. As with any query system, it is sometimes possible to ask the same question different ways, with different effects on performance. NCBI requests that developers sending batch requests include a constant 'tool' argument for all requests using the utilities.

Parameters

string $tool:

File

pubmed/EntrezClient.php, line 145
EntrezClient.php Provides Entrez client to retrieve items from the NCBI databases Orginally writen by Stefan Freudenberg

Class

BiblioEntrezClient
@file EntrezClient.php Provides Entrez client to retrieve items from the NCBI databases Orginally writen by Stefan Freudenberg

Code

public function setTool($tool) {
  $this->tool = str_replace(array(
    " ",
    "\n",
    "\r",
  ), '', $tool);
}