ApiClient
extends Client
in package
implements
ApiClientInterface
uses
ApiClientTrait
Class ApiClient
Tags
Table of Contents
Interfaces
- ApiClientInterface
- Interface for api client.
Properties
- $credentials : Credentials
- $apiService : ServiceInterface
- $config : ApiConfiguration
- $defaultArgs : array<string|int, mixed>
- $logger : LoggerInterface
Methods
- __construct() : mixed
- creates a new api client.
- createQueryBuilder() : QueryBuilderInterface
- creates a query object via api service
- execute() : Result
- executes a query and return the Result model via api service
- getArguments() : array<string|int, mixed>
- Get the available configurations
- getConfiguration() : array<string|int, mixed>
- get the current Api client configuration
- getCredentials() : array<string|int, mixed>
- Get the current client credentials
- setApiService() : void
Properties
$credentials
protected
Credentials
$credentials
$apiService
private
ServiceInterface
$apiService
apiService
$config
private
ApiConfiguration
$config
config
$defaultArgs
private
static array<string|int, mixed>
$defaultArgs
= ['config' => ['endpointId' => ['type' => 'value', 'valid' => ['string'], 'doc' => 'default endpoint (stored filter) id for dataCycle API requests', 'required' => true], 'presets' => ['fields' => ['type' => 'value', 'valid' => ['Array'], 'doc' => 'default fields definition for dataCycle API request', 'default' => []], 'include' => ['type' => 'value', 'valid' => ['Array'], 'doc' => 'default include definition for dataCycle API request', 'default' => []], 'language' => ['type' => 'value', 'valid' => ['Array'], 'doc' => 'default language code for dataCycle API requests.', 'default' => ['de']]]]]
$logger
private
LoggerInterface
$logger
logger
Methods
__construct()
creates a new api client.
public
__construct(array<string|int, mixed> $args[, LoggerInterface|null $logger = null ][, ServiceFactoryMethod|null $serviceFactoryMethod = null ]) : mixed
APIYes
Parameters
- $args : array<string|int, mixed>
- $logger : LoggerInterface|null = null
- $serviceFactoryMethod : ServiceFactoryMethod|null = null
createQueryBuilder()
creates a query object via api service
public
createQueryBuilder([string $type = 'list' ][, array<string|int, mixed> $queryConfiguration = [] ]) : QueryBuilderInterface
APIYes
Parameters
- $type : string = 'list'
- $queryConfiguration : array<string|int, mixed> = []
Tags
Return values
QueryBuilderInterfaceexecute()
executes a query and return the Result model via api service
public
execute(QueryBuilderInterface $query[, ModelFactoryInterface|null $modelFactory = null ]) : Result
APIYes
Parameters
- $query : QueryBuilderInterface
- $modelFactory : ModelFactoryInterface|null = null
Tags
Return values
ResultgetArguments()
Get the available configurations
public
static getArguments() : array<string|int, mixed>
APIYes
Return values
array<string|int, mixed>getConfiguration()
get the current Api client configuration
public
getConfiguration() : array<string|int, mixed>
APIYes
Return values
array<string|int, mixed>getCredentials()
Get the current client credentials
public
getCredentials() : array<string|int, mixed>
APIYes
Return values
array<string|int, mixed>setApiService()
private
setApiService(ServiceFactoryMethod $apiServiceFactory) : void
Parameters
- $apiServiceFactory : ServiceFactoryMethod