You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a question mark at the beginning of type to mark property as nullable, i.e., **?string**, **?integer**.
201
212
@@ -242,7 +253,7 @@ Stored in the database as "red,yellow,green":
242
253
243
254
.. note:: Casting as CSV uses PHP's internal ``implode`` and ``explode`` methods and assumes all values are string-safe and free of commas. For more complex data casts try ``array`` or ``json``.
244
255
245
-
Custom casting
256
+
Custom Casting
246
257
--------------
247
258
248
259
You can define your own conversion types for getting and setting data.
@@ -260,12 +271,12 @@ If you don't need to change values when getting or setting a value. Then just do
260
271
261
272
.. literalinclude:: entities/019.php
262
273
263
-
**Parameters**
274
+
Parameters
275
+
----------
264
276
265
277
In some cases, one type is not enough. In this situation, you can use additional parameters.
266
-
Additional parameters are indicated in square brackets and listed with a comma.
267
-
268
-
**type[param1, param2]**
278
+
Additional parameters are indicated in square brackets and listed with a comma
279
+
like ``type[param1, param2]``.
269
280
270
281
.. literalinclude:: entities/020.php
271
282
@@ -275,8 +286,9 @@ Additional parameters are indicated in square brackets and listed with a comma.
275
286
the value ``nullable`` will be passed to the casting type handler.
276
287
If casting type has predefined parameters, then ``nullable`` will be added to the end of the list.
277
288
289
+
*******************************
278
290
Checking for Changed Attributes
279
-
===============================
291
+
*******************************
280
292
281
293
You can check if an Entity attribute has changed since it was created. The only parameter is the name of the
0 commit comments