InvalidFieldValueException
extends HydrationException
in package
Thrown when a text value of a field cannot be converted to the type the field declares.
The external Api client sends data in the query string, so every value arrives as a
string. The hydrator converts it by the setter type ('12' to 12, 'true' to true).
When the conversion fails ('1.9' into int, a non-boolean word into bool), this
exception carries the field name; without it the typed setter would fail with an
unreadable TypeError.
Table of Contents
Properties
- $expectedType : string
- $field : string
Methods
- __construct() : mixed
- getExpectedType() : string
- getField() : string
Properties
$expectedType read-only
private
string
$expectedType
$field read-only
private
string
$field
Methods
__construct()
public
__construct(string $field, string $expectedType, string $value) : mixed
Parameters
- $field : string
- $expectedType : string
- $value : string
getExpectedType()
public
getExpectedType() : string
Return values
stringgetField()
public
getField() : string