mezon/crud-service-client

Small crud-service-client script

1.0.3 2022-01-21 15:04 UTC

This package is auto-updated.

Last update: 2024-04-21 19:32:07 UTC


README

Intro

Mezon provides simple client for CRUD service.

Installation

Just print in console

composer require mezon/crud-service-client

And that's all )

Reference

This class provides CRUD-like all-purpose methods:

create($data)
update(int $id, array $data, int $crossDomain = 0)
newRecordsSince($date)
recordsCount()
lastRecords($count, $filter)
delete(int $id, int $crossDomain = 0): string
recordsCountByField(string $field, $filter = false): array
deleteFiltered($crossDomain = 0, $filter = false)
getRecordsBy($filter, $crossDomain = 0)
getById($id, $crossDomain = 0)
getByIdsArray($ids, $crossDomain = 0)
getList(int $from = 0, int $limit = 1000000000, $crossDomain = 0, $filter = false, $order = false): array

// and some utilities
static function instance(string $service, string $token): \Mezon\CrudService\CrudServiceClient
getFields(): array