public function setReplacements($replacements)
    {
        if (!($replacements instanceof Swift_Plugins_Decorator_Replacements)) {
            $this->replacements = (array) $replacements;
        } else {
            $this->replacements = $replacements;
        }
    }