protected function implodeAssociative($glue, array $array)
    {
        $result = '';

        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $value = implode('|', $value);
            }

            $result .= $key . $glue . $value . PHP_EOL;
        }

        return $result;
    }