public static function splitPath($path)
{
$keys = is_string($path) ? array_filter(explode('.', $path)) : $path;
if (!is_array($keys)) {
throw new InvalidArgumentException('The path should be either an array or a string.');
}
if (empty($keys)) {
throw new InvalidArgumentException('The path should not be empty.');
}
return $keys;
}