src/Controller/Plugin/YawikConfigCreator.php
protected function generateConfigContent(array $config)
    {
        /* This code is taken from ZF2s' classmap_generator.php script. */

        // Create a file with the class/file map.
        // Stupid syntax highlighters make separating < from PHP declaration necessary
        $content = '<' . "?php\n"
                   . "\n"
                   . 'return ' . var_export($config, true) . ';';

        // Fix \' strings from injected DIRECTORY_SEPARATOR usage in iterator_apply op
        $content = str_replace("\\'", "'", $content);


        // Remove unnecessary double-backslashes
        $content = str_replace('\\\\', '\\', $content);

        // Exchange "array (" width "array("
        $content = str_replace('array (', 'array(', $content);

        // Make the file end by EOL
        $content = rtrim($content, "\n") . "\n";

        var_export($config, true);

        return $content;
    }
protected function generateConfigContent(array $config)
    {
        /* This code is taken from ZF2s' classmap_generator.php script. */

        // Create a file with the class/file map.
        // Stupid syntax highlighters make separating < from PHP declaration necessary
        $content = '<' . "?php\n"
                   . "\n"
                   . 'return ' . var_export($config, true) . ';';

        // Fix \' strings from injected DIRECTORY_SEPARATOR usage in iterator_apply op
        $content = str_replace("\\'", "'", $content);


        // Remove unnecessary double-backslashes
        $content = str_replace('\\\\', '\\', $content);

        // Exchange "array (" width "array("
        $content = str_replace('array (', 'array(', $content);

        // Make the file end by EOL
        $content = rtrim($content, "\n") . "\n";

        var_export($config, true);

        return $content;
    }
protected function generateConfigContent ( array $ config ) { /* This code is taken from ZF2s' classmap_generator.php script. */ // Create a file with the class/file map. // Stupid syntax highlighters make separating < from PHP declaration necessary $ content = '<' . "?php\n" . "\n" . 'return ' . var_export ( $ config , true ) . ';' ; // Fix \' strings from injected DIRECTORY_SEPARATOR usage in iterator_apply op $ content = str_replace ( "\\'" , "'" , $ content ) ; // Remove unnecessary double-backslashes $ content = str_replace ( '\\\\' , '\\' , $ content ) ; // Exchange "array (" width "array(" $ content = str_replace ( 'array (' , 'array(' , $ content ) ; // Make the file end by EOL $ content = rtrim ( $ content , "\n" ) . "\n" ; var_export ( $ config , true ) ; return $ content ; }
Generates the content for the configuration file.

@param array $config

@return string
Generates the content for the configuration file .