PHP Class AlgoliaSearch\ClientContext

Afficher le fichier Open project: algolia/algoliasearch-client-php

Méthodes publiques

Свойство Type Description
$adminAPIKey string
$algoliaUserToken string
$apiKey string
$applicationID string
$connectTimeout integer
$curlMHandle resource
$endUserIP string
$readHostsArray array
$writeHostsArray array

Méthodes publiques

Méthode Description
__construct ( string $applicationID, string $apiKey, array $hostsArray, boolean $placesEnabled = false ) ClientContext constructor.
__destruct ( ) Closes eventually opened curl handles.
disableRateLimit ( ) Disables the rate limit.
getMHandle ( $curlHandle ) : resource
releaseMHandle ( $curlHandle )
setAlgoliaUserToken ( string $token )
setExtraHeader ( string $key, string $value )
setForwardedFor ( string $ip )
setRateLimit ( string $adminAPIKey, string $endUserIP, string $rateLimitAPIKey )

Private Methods

Méthode Description
getDefaultReadHosts ( boolean $placesEnabled ) : array
getDefaultWriteHosts ( ) : array

Method Details

__construct() public méthode

ClientContext constructor.
public __construct ( string $applicationID, string $apiKey, array $hostsArray, boolean $placesEnabled = false )
$applicationID string
$apiKey string
$hostsArray array
$placesEnabled boolean

__destruct() public méthode

Closes eventually opened curl handles.
public __destruct ( )

disableRateLimit() public méthode

Disables the rate limit.
public disableRateLimit ( )

getMHandle() public méthode

public getMHandle ( $curlHandle ) : resource
$curlHandle
Résultat resource

releaseMHandle() public méthode

public releaseMHandle ( $curlHandle )
$curlHandle

setAlgoliaUserToken() public méthode

public setAlgoliaUserToken ( string $token )
$token string

setExtraHeader() public méthode

public setExtraHeader ( string $key, string $value )
$key string
$value string

setForwardedFor() public méthode

public setForwardedFor ( string $ip )
$ip string

setRateLimit() public méthode

public setRateLimit ( string $adminAPIKey, string $endUserIP, string $rateLimitAPIKey )
$adminAPIKey string
$endUserIP string
$rateLimitAPIKey string

Property Details

$adminAPIKey public_oe property

public string $adminAPIKey
Résultat string

$algoliaUserToken public_oe property

public string $algoliaUserToken
Résultat string

$apiKey public_oe property

public string $apiKey
Résultat string

$applicationID public_oe property

public string $applicationID
Résultat string

$connectTimeout public_oe property

public int $connectTimeout
Résultat integer

$curlMHandle public_oe property

public resource $curlMHandle
Résultat resource

$endUserIP public_oe property

public string $endUserIP
Résultat string

$readHostsArray public_oe property

public array $readHostsArray
Résultat array

$writeHostsArray public_oe property

public array $writeHostsArray
Résultat array