mezon / crud-service-client
Small crud-service-client script
Installs: 1 484
Dependents: 5
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 0
Open Issues: 1
Requires
- php: >=7.2.0
- mezon/functional: >=1.0.0
- mezon/service-client: >=1.0.0
Requires (Dev)
- infection/infection: ^0.21.5
- phpunit/php-token-stream: 3.1.2
- phpunit/phpunit: ^8.5
- vimeo/psalm: ^4.2
This package is auto-updated.
Last update: 2024-11-06 20:05:47 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