Download the PHP package rebasedata/php-client without Composer
On this page you can find all versions of the php package rebasedata/php-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-client
rebasedata-php-client
Introduction
This library allows to read and convert various database formats in PHP using the RebaseData API. When processing a database, the database is first sent to the secure RebaseData servers which then return the converted data. Below you will find several examples.
Dependencies
The library does not have any dependencies.
Installation
To install this library, you need Composer.
-
To install
rebasedata/php-client
using Composer, run the following command: - Then include Composer's autoloader file that helps to autoload the libraries it downloads. To use it, just add the following line to your application:
Examples
At first, you need to define one or more input files for the database conversion.
It's also possible to define a name for the input file that is different than the path. The file's name and extension are important for the conversion.
List all tables of an ACCDB file.
List all tables of a password-protected MSSQL BAK file.
Read the columns of a table called cars
of an ACCDB file.
Read the rows of a single table called cars
of an ACCDB file. Since we're using the method getRowsIterator()
which returns an iterator, the table can also be huge and our memory footprint is still low.
If you want to work yourself on the CSV file of a certain table, you can get the CSV file like this:
Or don't you want to work on the data itself in PHP? Let's assume you want to convert certain input files to a new format and have them stored in a target directory, the following code snippet shows how to do it:
Similarly, you can convert input files to a new format and have them stored as ZIP file:
By the default, the library will use the system's temporary folder as working directory. If you want to change that, you need to adjust the config:
In case you convert the same input files multiple times, you can enable the local cache so that the future conversion processes are much faster. You can also configure the caching directory. By default, the caching directory is inside of the working directory (see above).
For conversions above a certain size, RebaseData requires a Customer Key that you can buy on the website. You can pass it like this:
Tests
To run tests, run the PHPUnit utility:
License
This code is licensed under the MIT license.
Feedback
We love to get feedback from you! Did you discover a bug? Do you need an additional feature? Open an issue on Github and RebaseData will try to resolve your issue as soon as possible! Thanks in advance for your feedback!