th3mouk/rethinkdb-translator

Convert cursor and array objects to associative array

1.1.1 2019-07-24 14:27 UTC

This package is auto-updated.

Last update: 2024-11-27 23:37:59 UTC


README

This PHP library providing a simple way to translate the result of danielmewes/php-rql library.

Latest Stable Version Latest Unstable Version Total Downloads License

Build Status Scrutinizer Code Quality

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.