lib/classes/Swift/Transport/StreamBuffer.php
public function setWriteTranslations(array $replacements)
    {
        foreach ($this->translations as $search => $replace) {
            if (!isset($replacements[$search])) {
                $this->removeFilter($search);
                unset($this->translations[$search]);
            }
        }

        foreach ($replacements as $search => $replace) {
            if (!isset($this->translations[$search])) {
                $this->addFilter(
                    $this->replacementFactory->createFilter($search, $replace), $search
                    );
                $this->translations[$search] = true;
            }
        }
    }
public function setWriteTranslations(array $replacements)
    {
        foreach ($this->translations as $search => $replace) {
            if (!isset($replacements[$search])) {
                $this->removeFilter($search);
                unset($this->translations[$search]);
            }
        }

        foreach ($replacements as $search => $replace) {
            if (!isset($this->translations[$search])) {
                $this->addFilter(
                    $this->replacementFactory->createFilter($search, $replace), $search
                    );
                $this->translations[$search] = true;
            }
        }
    }
public function setWriteTranslations ( array $ replacements ) { foreach ( $ this -> translations as $ search => $ replace ) { if ( ! isset ( $ replacements [ $ search ] ) ) { $ this -> removeFilter ( $ search ) ; unset ( $ this -> translations [ $ search ] ) ; } } foreach ( $ replacements as $ search => $ replace ) { if ( ! isset ( $ this -> translations [ $ search ] ) ) { $ this -> addFilter ( $ this -> replacementFactory -> createFilter ( $ search , $ replace ) , $ search ) ; $ this -> translations [ $ search ] = true ; } } }
Set an array of string replacements which should be made on data written
to the buffer.

This could replace LF with CRLF for example.

@param string[] $replacements
Set an array of string replacements which should be made on data written to the buffer .