FrostMVC\Nullable
use FrostMVC\Nullable;
Sentinel type used as a typed "no argument provided" marker.
PHP does not have a built-in way to distinguish between a caller passing null and a caller omitting an optional parameter. Using new Nullable() as a default value combined with Nullable::is() / Nullable::isNot() allows methods to detect whether an argument was actually supplied.
| ::is() | Returns true when the given value is an instance of Nullable. Use this to detect that an optional parameter was not supplied. |
| ::isNot() | Returns true when the given value is NOT an instance of Nullable. Use this to detect that an optional parameter was actually supplied. |
| ::isNull() | Returns true when the value is strictly PHP null. Provided for completeness; prefer a |
Nullable::is($object)
Returns true when the given value is an instance of Nullable. Use this to detect that an optional parameter was not supplied.
| $object | mixed |
bool
Nullable::isNot($object)
Returns true when the given value is NOT an instance of Nullable. Use this to detect that an optional parameter was actually supplied.
| $object | mixed |
bool
Nullable::isNull($value)
Returns true when the value is strictly PHP null. Provided for completeness; prefer a === null check directly in most cases.
| $value | mixed |
bool
Generated from core/classes/Nullable.php (FrostMVC ).