Download the PHP package airmoi/filemaker without Composer

On this page you can find all versions of the php package airmoi/filemaker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filemaker

FileMaker® PHP-API

FileMaker® PHP API rewritten for modern PHP. It requires PHP 8.2+ (tested up to PHP 8.5) and uses PSR-4 autoloading specifications.

Features

This version of the PHP-API add the following feature to the offical API :

Requirements

The API is pure PHP: it runs on any operating system and hosting supported by PHP (Linux, shared hosting/cPanel, macOS, Windows...), it does not need to be installed on the FileMaker Server machine. On shared hosting, make sure the required PHP extensions are enabled and that outgoing HTTP(S) connections to your FileMaker Server are allowed.

PHP 5.x/7.x users should stick to the 3.0.x releases.

Installation

Using Composer

You can use the composer package manager to install. Either run:

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

or add:

"airmoi/filemaker": "^3.1"

to your composer.json file

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.

Usage

STEP 1 : Read the 'Important Notice' below

STEP 2 : include the API autoload

This step is facultative if you are using composer

STEP 3 : Create a FileMaker instance

STEP 4 : use it quite the same way you would use the offical API...

...And enjoy code completion using your favorite IDE and PHP 8 support without notice/warnings.

You may also find sample usage by reading the sample.php file located in the "demo" folder

Sample demo code

Important notices

Switch from original PHP-API

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

The major changes compared to the official package are :

You can use the offical PHP-API guide provided by FileMaker® for everything else.

dataAPI support

A hard work has been done to make dataAPI support as transparent as possible. The goal was to let you be able to switch from CWP to dataAPI by just switching a property.

However, despite the dataAPI has roughly the same functionality, some of its behaviors differs from the CWP, which required some workarounds.

  1. Globals lives across a session and can only be defined using a dedicated method, to fix that and prevent unexpected behaviors, globals are defined before performing a query, then reset after the query was performed.
  2. Perform Script action returns the script result instead of a foundset (no workaround here, just to inform you that you'll get a script result instead of the resulting foundset). As a workaround, you may create a find query and use setScript($scriptName, $scriptParam) method to get the resulting foundset
  3. DataAPI requires to login using credentials, then perform queries using the resulting token. The token is saved and reused across requests, as long as it is valid, using your sessionHandler if defined, or the PHP session otherwise (a PHP session is started if needed and headers are not sent yet). When the token cannot be saved (CLI scripts, headers already sent...), the API automatically logs out when the FileMaker object is destroyed (ie end of your script), so FileMaker Server connections are released. Saved tokens expire on FileMaker Server after 15 minutes of inactivity; call $fm->logout() to close the Data API session explicitly (ie: when your user logs out).
  4. When a token is expired, it will automatically be regenerated
  5. DataAPI's "Layout" method only returns fields and value lists of the layout. Other meta's such as layout OT, layout Base Table name (same for portals) are only returned with a found set (hope Claris will fix this in a next release). It means, in order to keep the "getLayout" method consistent, that its has to query a "random" record on the given layout to retrieve those meta, so don't be surpised if you use getLayout() to see 2 queries performed to dataAPI. If the table is empty, layout Object won't have those metas.
  6. DataAPI as a default pagination of 100 (while CWP does not have default pagination at all). To prevent truncated results, when no range limit is defined, the API will loop across pages to return the full foundset

Prevalidation

When the 'prevalidate' option is enabled, field validation rules defined in FileMaker (not empty, numeric only, max characters, date/time formats...) are checked before sending the request.

Logging

Use $fm->setLogger($logger) to log requests, your logger must implement a log($message, $level) method. Only messages whose level is lower than or equal to the 'logLevel' property are forwarded to your logger (default to FileMaker::LOG_ERR, set FileMaker::LOG_INFO to log requests or FileMaker::LOG_DEBUG for more details, false to disable logging). Nothing is logged when no logger is set. Passwords and Data API tokens are masked in logged requests.

Troubleshooting

Changelog

3.1.0

Tests

Integration settings can also be provided through environment variables, which take precedence over phpunit.xml: FM_HOST, FM_DATABASE, FM_USER, FM_PASSWORD and FM_USE_DATA_API (true to run the suite against the Data API).

Continuous integration

The GitHub Actions workflow (.github/workflows/tests.yml) runs on pull requests and pushes to master:

TODO

License

FileMaker PHP API is licensed under the BSD License - see the LICENSE file for detail

Credits

Contributors


All versions of filemaker with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-curl Version *
ext-json Version *
ext-mbstring Version *
ext-xml Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package airmoi/filemaker contains the following files

Loading the files please wait ...