Skip to content

Commit 35ef07c

Browse files
committed
Ver.19
1 parent fb6a1a3 commit 35ef07c

4 files changed

Lines changed: 15 additions & 13 deletions

File tree

FMDataAPI.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
/**
44
* Object-oriented class for the REST API in FileMaker Server 18/Cloud.
55
*
6-
* @version 18.0
6+
* @version 19.0
77
* @author Masayuki Nii <nii@msyk.net>
8-
* @copyright 2017-2018 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
8+
* @copyright 2017-2019 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
99
*/
1010

1111
namespace INTERMediator\FileMakerServer\RESTAPI;
@@ -17,7 +17,7 @@
1717
* @link https://github.com/msyk/FMDataAPI GitHub Repository
1818
* @property-read FileMakerLayout $<<layout_name>> Returns the FileMakerLayout object from the layout named with the property.
1919
* If the layout doesn't exist, no error arises here. Any errors might arise on methods of FileMakerLayout class.
20-
* @version 18
20+
* @version 19
2121
* @author Masayuki Nii <nii@msyk.net>
2222
* @copyright 2017-2019 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
2323
* @source 1 100000 The source code.
@@ -357,7 +357,7 @@ public function getReturnedCount()
357357
*
358358
* @package INTER-Mediator\FileMakerServer\RESTAPI
359359
* @link https://github.com/msyk/FMDataAPI GitHub Repository
360-
* @version 18
360+
* @version 19
361361
* @author Masayuki Nii <nii@msyk.net>
362362
* @copyright 2017-2019 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
363363
*/
@@ -955,7 +955,7 @@ public function getScriptResultPresort()
955955
* @property string $<<field_name>> The field value named as the property name.
956956
* @property FileMakerRelation $<<portal_name>> FileMakerRelation object associated with the property name.
957957
* The table occurrence name of the portal can be the 'portal_name,' and also the object name of the portal.
958-
* @version 18
958+
* @version 19
959959
* @author Masayuki Nii <nii@msyk.net>
960960
* @copyright 2017-2019 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
961961
*/
@@ -1435,7 +1435,7 @@ public function rewind()
14351435
*
14361436
* @package INTER-Mediator\FileMakerServer\RESTAPI
14371437
* @link https://github.com/msyk/FMDataAPI GitHub Repository
1438-
* @version 18
1438+
* @version 19
14391439
* @author Masayuki Nii <nii@msyk.net>
14401440
* @copyright 2017-2019 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
14411441
*/

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# FMDataAPI Ver.18 [![Build Status](https://travis-ci.org/msyk/FMDataAPI.svg?branch=master)](https://travis-ci.org/msyk/FMDataAPI)
1+
# FMDataAPI Ver.19 [![Build Status](https://travis-ci.org/msyk/FMDataAPI.svg?branch=master)](https://travis-ci.org/msyk/FMDataAPI)
22

33
by Masayuki Nii (nii@msyk.net)
44

@@ -63,7 +63,7 @@ FMDataAPI has "composer.json," so you can add your composer.json file in your pr
6363
...
6464
"require": {
6565
...
66-
"inter-mediator/fmdataapi":"18"
66+
"inter-mediator/fmdataapi":"19"
6767
} ...
6868
```
6969

@@ -141,6 +141,8 @@ MIT License
141141
- 2019-05-27: [Ver.18]
142142
Add getTargetTable(), getTotalCount(), getFoundCount(), getReturnedCount() to FileMakerRelation class.
143143
Add getTargetTable(), getTotalCount(), getFoundCount(), getReturnedCount() to FMDataAPI class.
144+
- 2019-09-12: [Ver.19]
145+
Add the duplicate() method to the FileMakerLayout class. Thanks to schube.
144146

145147
## API Differences between ver.8 and 7.
146148
### FMDataAPI class

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"prefer-stable": true,
1212
"require": {
13-
"php": ">=5.4.0"
13+
"php": ">=5.5.0"
1414
},
1515
"require-dev": {
1616
"phpunit/phpunit": "*",

samples/FMDataAPI_Sample.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
// set the name to any variable such as $fname = 'field_name'; echo $record->$fname;.
9494

9595
// A portal name property returns records of portal as FileMakerRelation object.
96-
$contacts = $record->Contact;
96+
$contacts = $record->contact_to;
9797

9898
// If the query is succeed, the following information can be detected.
9999
var_dump($contacts);
@@ -128,7 +128,7 @@
128128
echo "id: {$result->id},";
129129
echo "name: {$result->name},";
130130
echo "mail: {$result->mail}<hr>";
131-
$contacts = $result->Contact;
131+
$contacts = $result->contact_to;
132132

133133
for ($j = 0; $j < $contacts->count(); $j++) {
134134
echo "[PORTAL(contact_to)] id: {$contacts->field("id", "contact_to")},";
@@ -232,7 +232,7 @@
232232

233233
// The 'query()' method can have several parameters. The portal specification has to be an array
234234
// with the object name of the portal not the table occurrence name.
235-
$portal = array("Contact");
235+
$portal = array("contact_to");
236236
$result = $fmdb->person_layout->query(array(array("id" => "1")), null, 1, -1, $portal);
237237
if (!is_null($result)) {
238238
foreach ($result as $record) {
@@ -243,7 +243,7 @@
243243
}
244244
}
245245
// The 'query()' method can have several parameters. The second parameter is for sorting.
246-
$portal = array("Contact");
246+
$portal = array("contact_to");
247247
$result = $fmdb->person_layout->query(array(array("id" => "1...")), array(array("id", "descend")), 1, -1, $portal);
248248
if (!is_null($result)) {
249249
foreach ($result as $record) {

0 commit comments

Comments
 (0)