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;
    }
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;
    }
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 ; }
Returns a representation of the htaccess, ready for inclusion in a file

@api
@param int $indentation [optional] Defaults to null
@param bool $ignoreWhiteLines [optional] Defaults to null
@param bool $ignoreComments [optional] Defaults to null
@return string
Returns a representation of the htaccess ready for inclusion in a file