| Fully Qualified Name: | Laminas\Hydrator\Strategy\BooleanStrategy |
| Implements: | StrategyInterface |
This Strategy extracts and hydrates int and string values to Boolean values
| Name | Description | Defined By |
|---|---|---|
| __construct() | BooleanStrategy | |
| extract() | Converts the given value so that it can be extracted by the hydrator. | BooleanStrategy |
| hydrate() | Converts the given value so that it can be hydrated by the hydrator. | BooleanStrategy |
| Parameter Name | Type | Description |
|---|---|---|
| $trueValue | int|string | |
| $falseValue | int|string |
Returns:
Converts the given value so that it can be extracted by the hydrator.
| Parameter Name | Type | Description |
|---|---|---|
| $value | bool | The |
| $object |
Returns: int|string Returns the value that should be extracted.
Converts the given value so that it can be hydrated by the hydrator.
| Parameter Name | Type | Description |
|---|---|---|
| $value | bool|int|string | The |
| $data |
Returns: bool Returns the value that should be hydrated.