original_string: public function openToBrowser($outputFileName)
      {
          $this->outputFilePath = $this->globalFunctionsHelper->basename($outputFileName);
  
          $this->filePointer = $this->globalFunctionsHelper->fopen('php://output', 'w');
          $this->throwIfFilePointerIsNotAvailable();
  
          // Clear any previous output (otherwise the generated file will be corrupted)
          // @see https://github.com/box/spout/issues/241
          $this->globalFunctionsHelper->ob_end_clean();
  
          // Set headers
          $this->globalFunctionsHelper->header('Content-Type: ' . static::$headerContentType);
          $this->globalFunctionsHelper->header('Content-Disposition: attachment; filename="' . $this->outputFilePath . '"');
  
          /*
           * When forcing the download of a file over SSL,IE8 and lower browsers fail
           * if the Cache-Control and Pragma headers are not set.
           *
           * @see http://support.microsoft.com/KB/323308
           * @see https://github.com/liuggio/ExcelBundle/issues/45
           */
          $this->globalFunctionsHelper->header('Cache-Control: max-age=0');
          $this->globalFunctionsHelper->header('Pragma: public');
  
          $this->openWriter();
          $this->isWriterOpened = true;
  
          return $this;
      }
code: public function openToBrowser($outputFileName)
      {
          $this->outputFilePath = $this->globalFunctionsHelper->basename($outputFileName);
  
          $this->filePointer = $this->globalFunctionsHelper->fopen('php://output', 'w');
          $this->throwIfFilePointerIsNotAvailable();
  
          // Clear any previous output (otherwise the generated file will be corrupted)
          // @see https://github.com/box/spout/issues/241
          $this->globalFunctionsHelper->ob_end_clean();
  
          // Set headers
          $this->globalFunctionsHelper->header('Content-Type: ' . static::$headerContentType);
          $this->globalFunctionsHelper->header('Content-Disposition: attachment; filename="' . $this->outputFilePath . '"');
  
          /*
           * When forcing the download of a file over SSL,IE8 and lower browsers fail
           * if the Cache-Control and Pragma headers are not set.
           *
           * @see http://support.microsoft.com/KB/323308
           * @see https://github.com/liuggio/ExcelBundle/issues/45
           */
          $this->globalFunctionsHelper->header('Cache-Control: max-age=0');
          $this->globalFunctionsHelper->header('Pragma: public');
  
          $this->openWriter();
          $this->isWriterOpened = true;
  
          return $this;
      }
code_tokens: public function openToBrowser ( $ outputFileName ) { $ this -> outputFilePath = $ this -> globalFunctionsHelper -> basename ( $ outputFileName ) ; $ this -> filePointer = $ this -> globalFunctionsHelper -> fopen ( 'php://output' , 'w' ) ; $ this -> throwIfFilePointerIsNotAvailable ( ) ; // Clear any previous output (otherwise the generated file will be corrupted) // @see https://github.com/box/spout/issues/241 $ this -> globalFunctionsHelper -> ob_end_clean ( ) ; // Set headers $ this -> globalFunctionsHelper -> header ( 'Content-Type: ' . static :: $ headerContentType ) ; $ this -> globalFunctionsHelper -> header ( 'Content-Disposition: attachment; filename="' . $ this -> outputFilePath . '"' ) ; /*
           * When forcing the download of a file over SSL,IE8 and lower browsers fail
           * if the Cache-Control and Pragma headers are not set.
           *
           * @see http://support.microsoft.com/KB/323308
           * @see https://github.com/liuggio/ExcelBundle/issues/45
           */ $ this -> globalFunctionsHelper -> header ( 'Cache-Control: max-age=0' ) ; $ this -> globalFunctionsHelper -> header ( 'Pragma: public' ) ; $ this -> openWriter ( ) ; $ this -> isWriterOpened = true ; return $ this ; }
docstring: Inits the writer and opens it to accept data.
  By using this method, the data will be outputted directly to the browser.
  
  @codeCoverageIgnore
  
  @api
  @param  string $outputFileName Name of the output file that will contain the data. If a path is passed in, only the file name will be kept
  @return AbstractWriter
  @throws \Box\Spout\Common\Exception\IOException If the writer cannot be opened
docstring_tokens: Inits the writer and opens it to accept data . By using this method the data will be outputted directly to the browser .