eZ\Publish\Core\FieldType\MapLocation\Type::checkValueStructure PHP Method

checkValueStructure() protected method

Throws an exception if value structure is not of expected format.
protected checkValueStructure ( Value $value )
$value eZ\Publish\Core\FieldType\Value
    protected function checkValueStructure(BaseValue $value)
    {
        if (!is_float($value->latitude) && !is_int($value->latitude)) {
            throw new InvalidArgumentType('$value->latitude', 'float', $value->latitude);
        }
        if (!is_float($value->longitude) && !is_int($value->longitude)) {
            throw new InvalidArgumentType('$value->longitude', 'float', $value->longitude);
        }
        if (!is_string($value->address)) {
            throw new InvalidArgumentType('$value->address', 'string', $value->address);
        }
    }