protected static function addReplacement($string, $prefix)
    {
        if (is_string($string)) {
            if (is_string($prefix)) {
                $hash = md5(self::$counter);
                $placeholder = "_" . $prefix . "_" . $hash . "_";
                self::$replacements[$hash] = $string;
                self::$counter++;

                return $placeholder;
            } else {
                throw new \InvalidArgumentException(
                    "Invalid type '" . gettype($prefix). "' for argument 'prefix' given."
                );
            }
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($string). "' for argument 'string' given."
            );
        }
    }