Maslosoft Mangan Documentation
MongoDB Object Persister
Edit
Nullable Annotation
If true, value will be set to null
only if it is one of:
- Empty string
null
- Empty array
- Integer
0
- Float
0.0
- Boolean
false
- String
"0"
This will use the PHP's built in empty
construct.
This annotation default to true, and using false might have sense on on overridden properties.
Example usage:
@Nullable
Example of overriding nullable state:
// On base class
@Nullable
// On inherited property
@Nullable(false)