|
13 | 13 | * @link https://github.com/msyk/FMDataAPI GitHub Repository |
14 | 14 | * @property-read FileMakerLayout $<<layout_name>> Returns the FileMakerLayout object from the layout named with the property. |
15 | 15 | * If the layout doesn't exist, no error arises here. Any errors might arise on methods of FileMakerLayout class. |
16 | | - * @version 25 |
| 16 | + * @version 26 |
17 | 17 | * @author Masayuki Nii <nii@msyk.net> |
18 | 18 | * @copyright 2017-2022 Masayuki Nii (Claris FileMaker is registered trademarks of Claris International Inc. in the U.S. and other countries.) |
19 | 19 | * @source 1 100000 The source code. |
@@ -113,7 +113,8 @@ public function setDebug($value) |
113 | 113 | * Set the cURL communication timeout in seconds |
114 | 114 | * @param int $timeout |
115 | 115 | */ |
116 | | - public function setTimeout($timeout) { |
| 116 | + public function setTimeout($timeout) |
| 117 | + { |
117 | 118 | $this->provider->timeout = $timeout; |
118 | 119 | } |
119 | 120 |
|
@@ -144,6 +145,29 @@ public function setCertValidating($value) |
144 | 145 | $this->provider->isCertVaridating = $value; |
145 | 146 | } |
146 | 147 |
|
| 148 | + /** |
| 149 | + * Set to true if the return value of the field() method uses htmlspecialchars function. |
| 150 | + * The default value is FALSE. The nostalgic FileMaker API for PHP was returning htmlspecialchars value of the field. |
| 151 | + * If we want to get the row field data, we had to call getFieldUnencoded method. If this property set to true, |
| 152 | + * FileMakerRelation class's field method (including describing field name directly) returns the value processed |
| 153 | + * with htmlspecialchars. This means kind of compatible mode of FileMaker API for PHP. |
| 154 | + * This feature works whole the FMDataAPI library. |
| 155 | + * @param bool $value Turn on to verify the certificate if the value is true. |
| 156 | + */ |
| 157 | + public function setFieldHTMLEncoding($value) |
| 158 | + { |
| 159 | + $this->provider->fieldHTMLEncoding = $value; |
| 160 | + } |
| 161 | + |
| 162 | + /** |
| 163 | + * Detect the return value of the field() method uses htmlspecialchars function or not. |
| 164 | + * @return bool The result. |
| 165 | + */ |
| 166 | + public function getFieldHTMLEncoding($value) |
| 167 | + { |
| 168 | + return $this->provider->fieldHTMLEncoding; |
| 169 | + } |
| 170 | + |
147 | 171 | /** |
148 | 172 | * Set session token |
149 | 173 | * @param string $value The session token. |
|
0 commit comments