Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/Supporting/FileMakerRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @property string $fieldName The field value named as the property name accessed via __get().
* @property FileMakerRelation $portalName A FileMakerRelation object associated with the property name accessed via __get().
* The table occurrence name of the portal can be the 'portalName', and also the object name of the portal.
* @method bool __isset(string $name) Check if a field or portal exists.
* @version 36
* @author Masayuki Nii <nii@msyk.net>
* @copyright 2017-2026 Masayuki Nii (Claris FileMaker is registered trademarks of Claris International Inc. in the U.S. and other countries.)
Expand Down Expand Up @@ -217,6 +218,22 @@ public function __get($key)
return $this->field($key);
}

/**
* Handle the isset() function for the field or portal name.
* @param string $key The field or portal name.
* @return bool True if the field or portal exists.
* @ignore
*/
public function __isset(string $key): bool
{
try {
$this->field($key);
return true;
} catch (Exception $e) {
return false;
}
}

/**
* Return the array of field names.
*
Expand Down