VersionPress\Storages\Serialization\IniSerializer::getReplacedEolString PHP Method

getReplacedEolString() private static method

private static getReplacedEolString ( $str, $direction )
    private static function getReplacedEolString($str, $direction)
    {
        $replacement = ["\n" => "<<<[EOL-LF]>>>", "\r" => "<<<[EOL-CR]>>>"];
        $from = $direction == "charsToPlaceholders" ? array_keys($replacement) : array_values($replacement);
        $to = $direction == "charsToPlaceholders" ? array_values($replacement) : array_keys($replacement);
        return str_replace($from, $to, $str);
    }