public function txtSerialize($indentation = null, $ignoreWhiteLines = null, $ignoreComments = false)
    {
        /** @var \Tivie\HtaccessParser\Token\TokenInterface[] $array */
        $array = $this->getArrayCopy();
        $otp = '';

        $this->indentation = (is_null($indentation)) ? $this->indentation : $indentation;
        $ignoreWhiteLines = (is_null($ignoreWhiteLines)) ? $this->ignoreWhiteLines : $ignoreWhiteLines;
        $ignoreComments = (is_null($ignoreComments)) ? $this->ignoreCommentss : $ignoreComments;


        foreach ($array as $num => $token) {
            $otp .= $this->txtSerializeToken($token, 0, !!$ignoreWhiteLines, !!$ignoreComments);
        }

        // remove whitelines at the end
        $otp = rtrim($otp);
        // and add an empty newline
        $otp .= PHP_EOL;

        return $otp;
    }