Themsaid\Langman\Manager::stringLineMaker PHP Method

stringLineMaker() private method

Write the lines of the inner array of the language file.
private stringLineMaker ( $array, $prepend = '' ) : string
$array
return string
    private function stringLineMaker($array, $prepend = '')
    {
        $output = '';
        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $value = $this->stringLineMaker($value, $prepend . '    ');
                $output .= "\n{$prepend}    '{$key}' => [{$value}\n{$prepend}    ],";
            } else {
                $value = str_replace('\\"', '"', addslashes($value));
                $output .= "\n{$prepend}    '{$key}' => '{$value}',";
            }
        }
        return $output;
    }