Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions playground/php/src/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
$env['ALGOLIA_ADMIN_KEY']
);

$config->setMaxRetries(200);
var_dump($config->getDefaultMaxRetries());

//$config->setFullHosts(
// [
// 'http://localhost:6677',
Expand Down
16 changes: 15 additions & 1 deletion templates/php/client_config.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@ class {{configClassname}} extends {{#hasRegionalHost}}ConfigWithRegion{{/hasRegi
return $this->config['waitTaskTimeBeforeRetry'];
}

/**
* Sets the max retries value used in the Search helpers (e.g. replaceAllobjects)
*
* @param number $maxRetries the user agent of the api client
*
* @return $this
*/
public function setMaxRetries($maxRetries)
{
$this->config['defaultMaxRetries'] = $maxRetries;

return $this;
}

public function getDefaultMaxRetries()
{
return $this->config['defaultMaxRetries'];
Expand All @@ -73,4 +87,4 @@ class {{configClassname}} extends {{#hasRegionalHost}}ConfigWithRegion{{/hasRegi
{{/isSearchClient}}
];
}
}
}