承接 inter-mediator/fmdataapi 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

inter-mediator/fmdataapi

Composer 安装命令:

composer require inter-mediator/fmdataapi

包简介

FMDataAPI is the class library in PHP for accessing FileMaker database with FileMaker Data API.

README 文档

README

by Masayuki Nii (nii@msyk.net)

FMDataAPI is a class developed in PHP to access FileMaker database with Claris FileMaker Data API.

Contributers

They created pull requests. Thanks for cooperating.

  • Atsushi Matsuo
  • darnel
  • Craig Smith
  • Bernhard Schulz
  • montaniasystemab
  • Rickard Andersson
  • Julien @AnnoyingTechnology
  • Tom Kuijer
  • Thijs Meijer
  • Patrick Janser
  • Roger Engström
  • Stathis Askaridis
  • filiptorphage-mjuk

At a Glance

The FileMaker database named "TestDB.fmp12" is hosted on localhost, and it sets the "fmrest" as access privilege. The account to connect with REST API is "web" and "password." This database has the layout named "person_layout," and you can use the layout name as a property of the FMDataAPI instance. The return value of the "query" method is Iterator and can be repeated in the foreach statement with each record in the query result. This layout has the field named "FamilyName" and "GivenName," and can use the field name as a property.

$fmdb = new FMDataAPI("TestDB", "web", "password");
$result = $fmdb->person_layout->query();
foreach ($result as $record) {
    echo "name: {$record->FamilyName}, {$record->GivenName}";
}

For more details, I'd like to read codes and comments in file samples/FMDataAPI_Sample.php.

API Document is here: https://inter-mediator.info/FMDataAPI/packages/INTER-Mediator-FileMakerServer-RESTAPI.html

What's This?

The FileMaker Data API is the new feature of FileMaker Server 16, and it's the API with REST-based database operations. Although the Custom Web Publishing is the way to access the database for a long while, FileMaker Inc. has introduced the modern feature to operate the database. The current version of FMDataAPI works on just FileMaker 18 and 19 platform.

For now, I'm focusing on developing the web application framework "INTER-Mediator" (https://inter-mediator.com/ or https://github.com/INTER-Mediator/INTER-Mediator.git) which can develop the core features of database-driven web application with declarative descriptions. INTER-Mediator has already supported the Custom Web Publishing with FX.php, and I develop codes here for support REST APIs.

Bug reports and contributions are welcome.

Installing to Your Project

FMDataAPI has "composer.json," so you can add your composer.json file in your project as below.

...
"require": {
  ...
  "inter-mediator/fmdataapi":"37"
} ...

About Files and Directories

  • src/FMDataAPI.php
    • The core class, and you just use this for your application. This class and supporting classes are object-oriented REST API wrappers.
  • src/Supporting/**.php
    • The supporting classes for the FMDataAPI class. Perhaps you don't need to create these classes, but you have to handle methods on them.
  • composer.json, composer.lock
    • Composer information files.
  • Sample_results.ipynb
    • Sample program and results with Jupyter Notebook style. Sorry for slight old version results.
  • samples/FMDataAPI_Sample.php and cat.jpg
    • This is the sample program of FMDataAPI class, and shows how to use FMDataAPI class. It includes rich comments, but Sample_results.ipynb is more informative.
  • README.md, .gitignore
    • These are for GitHub.
  • test
    • Some files for unit testing.
  • .github, docker-compose.yml
    • Files for GitHub Actions to run CI jobs.

Licence

MIT License

Acknoledgement

  • Thanks to Atsushi Matsuo. Your script is quite helpful to implement the "localserver" feature. (https://gist.github.com/matsuo/ef5cb7c98bb494d507731886883bcbc1) Moreover, thanks for updating and fixing bugs.
  • Thanks to Frank Gonzalez. Your bug report is brilliant, and I could fix it quickly.
  • Thanks to base64bits for coding about container field.
  • Thanks to phpsa for bug fix.
  • Thanks to Flexboom for bug fix.
  • Thanks to schube for bug fix.
  • Thanks to frankeg for bug fix.

History

(Previous history is here)

  • 2021-02-10: [Ver.22] Setting the timeout value about cURL. Thanks to @montaniasystemab. Also thanks to @AnnoyingTechnology for correcting.
  • 2021-11-11: [Ver.23] File structure is updated for PSR-4. Thanks to tkuijer.
  • 2021-12-23: [Ver.24] Bug fix for portal limit parameter. Thanks to tkuijer.
  • 2022-03-24: [Ver.25] Add methods(getFirstRecord, getLastRecord, getRecords) to the FileMakerRelation class.
  • 2022-03-26: [Ver.26] Add methods(setFieldHTMLEncoding, getFieldHTMLEncoding) to the FMDataAPI class. These are going to use for compatibility mode of FileMaker API for PHP.
  • 2022-06-06: [Ver.27] Dropped the support of PHP5, the minimum version is PHP 7.1, but 7.2 or later is recommended.
  • 2022-08-04: [Ver.28] Added the getContainerData(URL) method to the FMDataAPI class for accessing container data from the url containing /Streaming/MainDB. [BUG FIX] The FileMakerRelation class's toArray method didn't return an array (Thanks to Talwinder Singh).
  • 2022-12-28: [Ver.29] Fixed the 'HTTP/2 stream 0 was not closed cleanly' problem with the new FileMaker (Thanks to @thijsmeijer). Also fixed the getPortalNames issue for single record relation (Thanks to @PGMMattias).
  • 2023-06-20: [Ver.30] The toArray() method bug fixed. In same cases, it returned []. (Thanks to @PGMMattias).
  • 2023-11-24: [Ver.31] The curlErrorMessage() method returns the error message from curl (Thanks to @P1-Roger). Corrected phpdoc issue (Thanks to @patacra).
  • 2024-10-10: [Ver.32] From this version, the minimum PHP version is 8.1. Fix SSL certificate check errors by using the system's certificate authorities (Thanks to @patacra). FileMakerLayout::getMetadataOld and getMetadata methods don't return the false value in the case of log-in error. It returns just null.
  • 2025-03-19: [Ver.33] The query method supports a date format parameter (Thanks to @stathisaska). The debug property of the CommunicationProvider class initializes to the bool false value (Thanks to Bernhard).
  • 2025-08-02: [Ver.34] Bug fixes were made in the sort parameter. A date format parameter was added. The FileMakerLayout::update method does nothing if the second parameter is null or {}. (Thanks to @filiptorphage-mjuk)
  • 2025-08-23: [Ver.35] Bug fix for the script parameter (Thanks to @frankeg). Also, bug fix for script parameter to keep the old way myself.
  • 2025-12-03: [Ver.36] Bug fix for limit and offset parameters (Thanks to Roger Engström). Deprecated function curl_close was removed (Thanks to @PGMMattias and @matsuo).
  • 2026-05-31: [Ver.37] Add persistent session token support by @filiptorphage-mjuk.
  • 2026-XX-XX: [Ver.38] Next release version.

inter-mediator/fmdataapi 适用场景与选型建议

inter-mediator/fmdataapi 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 69.46k 次下载、GitHub Stars 达 52, 最近一次更新时间为 2018 年 05 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「rest」 「api」 「FileMaker」 「INTER-Mediator」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 inter-mediator/fmdataapi 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 inter-mediator/fmdataapi 我们能提供哪些服务?
定制开发 / 二次开发

基于 inter-mediator/fmdataapi 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 69.46k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 52
  • 点击次数: 34
  • 依赖项目数: 5
  • 推荐数: 0

GitHub 信息

  • Stars: 52
  • Watchers: 13
  • Forks: 21
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-27