Meilisearch PHP | Documentation

Client
in package
implements Http

Table of Contents

Interfaces

Http

Properties

$baseUrl  : string
$headers  : array<string, string>
$http  : ClientInterface
$json  : Json
$requestFactory  : RequestFactoryInterface
$streamFactory  : StreamFactoryInterface

Methods

__construct()  : mixed
delete()  : mixed
get()  : mixed
patch()  : mixed
post()  : mixed
put()  : mixed
buildQueryString()  : string
execute()  : mixed
parseResponse()  : mixed

Properties

$baseUrl

private string $baseUrl

$headers

private array<string, string> $headers

$http

private ClientInterface $http

$requestFactory

private RequestFactoryInterface $requestFactory

$streamFactory

private StreamFactoryInterface $streamFactory

Methods

__construct()

public __construct(string $url[, string $apiKey = null ][, ClientInterface $httpClient = null ][, RequestFactoryInterface $reqFactory = null ][, array<int, string> $clientAgents = [] ][, StreamFactoryInterface $streamFactory = null ]) : mixed
Parameters
$url : string
$apiKey : string = null
$httpClient : ClientInterface = null
$reqFactory : RequestFactoryInterface = null
$clientAgents : array<int, string> = []
$streamFactory : StreamFactoryInterface = null

delete()

public delete(string $path[, array<string|int, mixed> $query = [] ]) : mixed
Parameters
$path : string
$query : array<string|int, mixed> = []
Tags
throws
ClientExceptionInterface
throws
ApiException

get()

public get(string $path[, array<string|int, mixed> $query = [] ]) : mixed
Parameters
$path : string
$query : array<string|int, mixed> = []
Tags
throws
ClientExceptionInterface
throws
ApiException
throws
CommunicationException

patch()

public patch(string $path[, mixed|null $body = null ][, array<string|int, mixed> $query = [] ]) : mixed
Parameters
$path : string
$body : mixed|null = null
$query : array<string|int, mixed> = []
Tags
throws
ApiException
throws
JsonEncodingException

post()

public post(string $path[, mixed|null $body = null ][, array<string|int, mixed> $query = [] ][, string $contentType = null ]) : mixed
Parameters
$path : string
$body : mixed|null = null
$query : array<string|int, mixed> = []
$contentType : string = null
Tags
throws
ApiException
throws
ClientExceptionInterface
throws
CommunicationException
throws
JsonEncodingException

put()

public put(string $path[, mixed $body = null ][, array<string|int, mixed> $query = [] ][, string $contentType = null ]) : mixed
Parameters
$path : string
$body : mixed = null
$query : array<string|int, mixed> = []
$contentType : string = null

buildQueryString()

private buildQueryString([array<string|int, mixed> $queryParams = [] ]) : string
Parameters
$queryParams : array<string|int, mixed> = []
Return values
string

On this page

Search results