protected function flattenArray(array $source, array &$dest)
    {
        foreach ($source as $elm) {
            if (is_array($elm)) {
                $this->flattenArray($elm, $dest);
            } else {
                $dest[] = $elm;
            }
        }
    }