https://github.com/kulikov-dev/filemaker
Connector to FileMaker for PHP 5.5>=
https://github.com/kulikov-dev/filemaker
connector e-commerce filemaker filemaker-api filemaker-data-api php php55 rest
Last synced: 10 months ago
JSON representation
Connector to FileMaker for PHP 5.5>=
- Host: GitHub
- URL: https://github.com/kulikov-dev/filemaker
- Owner: kulikov-dev
- License: mit
- Created: 2022-11-01T20:57:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-04T16:44:04.000Z (over 3 years ago)
- Last Synced: 2025-03-23T21:51:52.683Z (11 months ago)
- Topics: connector, e-commerce, filemaker, filemaker-api, filemaker-data-api, php, php55, rest
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Connector to the relational database [FileMaker](https://help.claris.com/en/data-api-guide/content/index.html) for PHP 5.5 >=
The connector allows to communicate with the FileMaker tables through the REST API, realizing operations of obtaining, finding and updating data. Support scripts.
Before work you need to initialize a connector with your credentials:
``` php
private static function initialize_fileMaker()
{
self::$file_maker_connector = new filemaker_connector();
self::$file_maker_connector->set_credentials('login', 'pass');
self::$file_maker_connector->set_entry_point('https://a111111.fmphost.com/fmi/data/v1/databases/test');
self::$file_maker_connector->open_connection();
if (self::$file_maker_connector == null || !self::$file_maker_connector->is_opened()) {
die('Initialize FileMakerConnector before work with Test database.');
}
}
```
After that the connector is ready to work. Below are samples of obtaining data with a FileMaker script:
``` php
$script = '&script=FindActiveForModifiedOnly&script.param=' . date("m-d-Y H:i:s", time());
$indexer = self::$file_maker_connector->get_table_content('Inventory', $script);
```
And updating a record in the FileMaker database:
``` php
$new_record = [];
$new_record["pk"] = strval($employee_info["WOVEN_ID"]);
$new_record["first"] = $employee_info["FNAME"];
$new_record["last"] = $employee_info["LNAME"];
$query_info = [
"query" => [[
"Employee" => '=' . $new_record["pk"]
]],
"limit" => "1",
"script" => "Employee DataAPIUpdate",
"script.param" => json_encode($new_record)
];
self::$file_maker_connector->update_record("Employees", $query_info);
```