theprivateer/filemaker

Database query-builder for FileMaker databases

v0.3-stable 2021-07-05 03:47 UTC

This package is auto-updated.

Last update: 2024-04-05 15:43:55 UTC


README

Latest Version on Packagist Total Downloads

This is an elegant object-orientated approach to dealing with FileMaker databases from PHP applications, very heavily inspired by the database query builder found in Laravel.

It also allows you to effortlessly switch between the traditional XML-based FMPHP connection method and the newer FMREST Data API.

The list of supported queries is still a bit limited, but does allow for some fairly complex requests under the hood. Over time I will be adding more query types to the package.

Installation

You can install the package via composer:

composer require theprivateer/filemaker

Usage

$config = [
    'driver'	=> 'fmphp',
    'host'      => '127.0.0.1',
    'file'      => 'DatabaseName',
    'user'      => 'admin',
    'password'  => 'someP@ssword',
];

$fm = new Privateer\FileMaker\FileMaker($config);

$user = $fm->layout('users')->where('username', 'privateer')->first();

$newUser = $fm->layout('users')->insert([
    'name'      => 'John Doe',
    'username'  => 'johndoe',
    'email'     => 'john@example.com'
]);

Testing

I'm working on test coverage - watch this space!

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email phils@hey.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

PHP Package Boilerplate

This package was generated using the PHP Package Boilerplate by Beyond Code.