public function setEscape(string $escape): self
    {
        if ($escape === $this->escape) {
            return $this;
        }

        if ('' === $escape || 1 === strlen($escape)) {
            $this->escape = $escape;
            $this->resetProperties();

            return $this;
        }

        throw new Exception(sprintf('%s() expects escape to be a single character or the empty string %s given', __METHOD__, $escape));
    }
public function setEscape(string $escape): self
    {
        if ($escape === $this->escape) {
            return $this;
        }

        if ('' === $escape || 1 === strlen($escape)) {
            $this->escape = $escape;
            $this->resetProperties();

            return $this;
        }

        throw new Exception(sprintf('%s() expects escape to be a single character or the empty string %s given', __METHOD__, $escape));
    }
public function setEscape ( string $ escape ) : self { if ( $ escape === $ this -> escape ) { return $ this ; } if ( '' === $ escape || 1 === strlen ( $ escape ) ) { $ this -> escape = $ escape ; $ this -> resetProperties ( ) ; return $ this ; } throw new Exception ( sprintf ( '%s() expects escape to be a single character or the empty string %s given' , __METHOD__ , $ escape ) ) ; }
Sets the field escape character.

@throws Exception If the Csv control character is not one character only.

@return static
Sets the field escape character .