CrudServiceClientAdapter
extends Common
in package
Logic adapter for list builder
Table of Contents
- $crudServiceClient : CrudServiceClientInterface
- Crud Service Client object
- $login : string
- Login
- $password : string
- Password
- $service : string
- Service name
- __construct() : mixed
- Constructor
- all() : array<string|int, mixed>
- Method returns all vailable records
- getClient() : CrudServiceClientInterface
- Method returns client to service
- getRecords() : array<string|int, mixed>
- Method returns a subset from vailable records
- preprocessListItem() : object
- Record preprocessor
- setClient() : mixed
- Method sets service client
Properties
$crudServiceClient
Crud Service Client object
protected
CrudServiceClientInterface
$crudServiceClient
= null
$login
Login
protected
string
$login
= ''
$password
Password
protected
string
$password
$service
Service name
protected
string
$service
= ''
Methods
__construct()
Constructor
public
__construct([string $service = '' ][, string $login = '' ][, string $password = '' ]) : mixed
Parameters
- $service : string = ''
-
Service name
- $login : string = ''
-
Login
- $password : string = ''
-
Password
Return values
mixed —all()
Method returns all vailable records
public
all() : array<string|int, mixed>
Return values
array<string|int, mixed> —all vailable records
getClient()
Method returns client to service
public
getClient() : CrudServiceClientInterface
Return values
CrudServiceClientInterface —Client
getRecords()
Method returns a subset from vailable records
public
getRecords(array<string|int, mixed> $order, int $from, int $limit) : array<string|int, mixed>
Parameters
- $order : array<string|int, mixed>
-
order settings
- $from : int
-
the beginning of the bunch
- $limit : int
-
the size of the batch
Return values
array<string|int, mixed> —subset from vailable records
preprocessListItem()
Record preprocessor
public
preprocessListItem(object $record) : object
Parameters
- $record : object
-
record to be preprocessed
Return values
object —preprocessed record
setClient()
Method sets service client
public
setClient(CrudServiceClientInterface $crudServiceClient) : mixed
Parameters
- $crudServiceClient : CrudServiceClientInterface
-
Service client