__construct()
__construct(string $host, string $db, string $extDataSource)
Constructor.
$extDataSource is a JSON string containing database credentials. The JSON string can be setup to include multiple databases for multi-file applications.
database => (string) The name of the database to user
username => (string) Connect to the database as this username.
password => (string) Password associated with the username.
Parameters
| string | $host | FileMaker Server URL |
| string | $db | FileMaker Database name |
| string | $extDataSource | JSON string |
Examples
/**
* sample code multi-file access
*/
$dbStr = '[{"database": "GiveItARest_SampleFile", "username": "api_user", "password": "password"}]';
$fmConnection = new GiveItARest('https://localhost','GiveItARest_SampleFile', $dbStr);
/**
* sample code multi-file access
*/
$dbStr = '[{"database": "GiveItARest_SampleFile", "username": "api_user", "password": "password"},
{"database": "DBFile2", "username": "api_user", "password": "password"}]';
$fmConnection = new GiveItARest('https://localhost','DBFile1', $dbStr);