Client object for executing commands on a web service.

package Ant\ChateaClient\Service\Client
see
see
see

 Methods

Client constructor

__construct(string $baseUrl, array|\Ant\ChateaClient\Service\Client\Collection $config) 

Parameters

$baseUrl

string

Base URL of the web service

$config

array\Ant\ChateaClient\Service\Client\Collection

Configuration settings

This method prepare uri with format api/{id}/user/{user_id} and replace for api/1/user/6

parseUrl(string $uri, array $params) : string

Parameters

$uri

string

The base string url

$params

array

A collection of params, the order is important

Exceptions

\InvalidArgumentException This exception is thrown if any parameter has errors

Returns

stringthe uri well formatted

 Constants

 

NAME_SERVICE_API

NAME_SERVICE_API 
 

NAME_SERVICE_AUTH

NAME_SERVICE_AUTH