2017 © Pedro PelĆ”ez
 

library filemaker

Rewriten FileMaker PHP-API

image

airmoi/filemaker

Rewriten FileMaker PHP-API

  • Saturday, December 30, 2017
  • by airmoi
  • Repository
  • 7 Watchers
  • 45 Stars
  • 5,862 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 14 Forks
  • 5 Open issues
  • 19 Versions
  • 9 % Grown

The README.md

FileMakerĀ® PHP-API

FileMakerĀ® PHP API rewritten for PHP 5.5+. It is compatible with PHP 7.0+ and uses PSR-4 autoloading specifications., (*1)

Features

This version of the PHP-API add the following feature to the offical API : * Error handling using Exception (you can restore the original behavior using option 'errorHandling' => 'default') * PSR-4 autoloading and installation using composer * PHP 7.0+ compatibility * 'dateFormat' option to select the input/output date format * 'emptyAsNull' option to return empty value as null * Support setRange() method with PerformScript command (as supported by CWP) * A method to get the url of your last CWP call: $fm->getLastRequestedUrl() * A method to check if a findRequest is empty: $request->isEmpty() * A method to get the value list associated to a field from a Record: $record->getValueListTwoField('my_field') * EXPERIMENTAL 'useDateFormatInRequests' allow you to use defined 'dateFormat' in request (support wildcards and range), (*2)

Requirements

  • PHP >= 5.5
  • (optional) PHPUnit to run tests.

Installation

Using Composer

You can use the composer package manager to install. Either run:, (*3)

$ php composer.phar require airmoi/filemaker "*"

or add:, (*4)

"airmoi/filemaker": "^2.2"

to your composer.json file, (*5)

Manual Install

You can also manually install the API easily to your project. Just download the source ZIP and extract its content into your project., (*6)

Usage

STEP 1 : Read the 'Important Notice' below, (*7)

STEP 2 : include the API autoload, (*8)

require '/path/to/autoloader.php';

This step is facultative if you are using composer, (*9)

STEP 3 : Create a FileMaker instance, (*10)

use airmoi\FileMaker\FileMaker;

$fm = new FileMaker($database, $host, $username, $password, $options);

STEP 4 : use it quite the same way you would use the offical API..., (*11)

...And enjoy code completion using your favorite IDE and php 7 support without notice/warnings., (*12)

You may also find sample usage by reading the sample.php file located in the "demo" folder, (*13)

Sample demo code

use airmoi\FileMaker\FileMaker;
use airmoi\FileMaker\FileMakerException;

require('/path/to/autoloader.php');

$fm = new FileMaker('database', 'localhost', 'filemaker', 'filemaker', ['prevalidate' => true]);

try {
    $command = $fm->newFindCommand('layout_name');
    $records = $command->execute()->getRecords(); 

    foreach($records as $record) {
        echo $record->getField('fieldname');
        ...
    }
} 
catch (FileMakerException $e) {
    echo 'An error occured ' . $e->getMessage() . ' - Code : ' . $e->getCode();
}

Important notice

The 2.1 release aims to improve compatibility with the original FileMaker PHP-API. However, you will need to changes few things in your code in order to use it, (*14)

The major changes compared to the official package are :, (*15)

  • Call autoloader.php instead of FileMaker.php to load the API
  • API now support Exceptions error handling, you may switch between those behaviors by changing property 'errorHandling' to 'default' or 'exception' (default value is 'exception')
  • There is no more 'conf.php' use "setProperty" to define specifics API's settings. You may also use an array of properties on FileMaker instanciation, ie : new FileMaker( $db, $host, $user, $pass, ['property' => 'value'])
  • All constants are now part of the FileMaker class, use FileMaker:: instead of
  • Also notice that FILEMAKER_SORT_ASCEND/DESCEND have been renamed to FileMaker::SORT_ASCEND/FileMaker::SORT_DESCEND

You can use the offical PHP-API guide provided by FileMakerĀ® for everything else., (*16)

TODO

  • Finish PHPunit test
  • Add functionnal tests
  • Improve parsers
  • Add new parsers
  • Documentation

License

FileMaker PHP API is licensed under the BSD License - see the LICENSE file for detail, (*17)

Credits

Contributors

The Versions

30/12 2017

dev-develop

dev-develop

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

30/12 2017

dev-master

9999999-dev

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

30/12 2017

2.2.4

2.2.4.0

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

30/10 2017

2.2.3

2.2.3.0

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

08/08 2017

2.2.2

2.2.2.0

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

03/08 2017

2.2.1

2.2.1.0

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

01/08 2017

2.2.0

2.2.0.0

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

05/04 2017

2.2.0-beta2

2.2.0.0-beta2

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

08/12 2016

2.2.0-beta1

2.2.0.0-beta1

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

02/12 2016

dev-feature/phpunit

dev-feature/phpunit

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

01/12 2016

dev-feature/rest_api_support

dev-feature/rest_api_support

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

01/12 2016

2.1.2

2.1.2.0

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

10/11 2016

2.1.1

2.1.1.0

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware license

The Development Requires

by Romain Dunand

filemaker php-api

07/11 2016

2.1.0

2.1.0.0

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware Licence

by Romain Dunand

filemaker php-api

06/07 2016

2.0.4

2.0.4.0

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware Licence

by Romain Dunand

filemaker php-api

23/09 2015

2.0.3

2.0.3.0

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware Licence

by Romain Dunand

filemaker php-api

07/09 2015

2.0.2-beta

2.0.2.0-beta

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware Licence

by Romain Dunand

filemaker php-api

02/09 2015

2.0.1-beta

2.0.1.0-beta

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware Licence

by Romain Dunand

filemaker php-api

11/05 2015

2.0.0-beta

2.0.0.0-beta

Rewriten FileMaker PHP-API

  Sources   Download

FileMaker Sofware Licence

by Romain Dunand

filemaker php-api