th3mouk / rethinkdb-translator
Convert cursor and array objects to associative array
Installs: 2 432
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- danielmewes/php-rql: ^2.3
Requires (Dev)
- phpro/grumphp: ^0.15.1
- phpstan/phpstan: ^0.11.5
- phpstan/phpstan-phpunit: ^0.11.2
- phpunit/phpunit: ^8.0
- sensiolabs/security-checker: ^5.0
- youdot/coding-standard: ^1.1
This package is auto-updated.
Last update: 2024-10-27 23:32:29 UTC
README
This PHP library providing a simple way to translate the result of danielmewes/php-rql
library.
Installation
composer require th3mouk/rethinkdb-translator
Usage
It exists three transformations:
Translate::cursorToAssociativeArray
Translate::arrayObjectToAssociativeArray
Translate::arrayOfArrayObjectToAssociativeArray
Options
You can pass an array of options to each of the available methods, here are the available options :
An example :
$options = ['dateTimeToString' => false]; // raw $data from RethinkDB Translate::cursorToAssociativeArray($data, $options);
Please
Feel free to improve this library.