Google\Cloud\Datastore\EntityMapper::getValueType PHP Méthode

getValueType() private méthode

Get the value type from a value object.
private getValueType ( array $value ) : string
$value array
Résultat string
    private function getValueType(array $value)
    {
        $keys = array_keys($value);
        $types = array_values(array_filter($keys, function ($key) {
            return strpos($key, 'Value') !== false;
        }));
        if (!empty($types)) {
            return $types[0];
        }
        throw new RuntimeException('Invalid entity property value given');
    }