protected function parseAsArray($var, $delimiter = '[\s,]+')
    {
        if (is_string($var)) {
            if (!is_string($delimiter)) {
                throw new InvalidArgumentException('The delimiter must be a string.');
            }

            $var = preg_split('#(?<!\\\\)'.$delimiter.'#', $var);
        }

        if (is_array($var) || $var instanceof Traversable) {
            return $var;
        }

        throw new InvalidArgumentException('The value cannot be split.');
    }