Differences Between: [Versions 402 and 403]
1 <?php 2 3 declare(strict_types=1); 4 5 namespace OpenSpout\Writer\XLSX; 6 7 use OpenSpout\Common\Helper\Escaper\XLSX; 8 use OpenSpout\Common\Helper\StringHelper; 9 use OpenSpout\Writer\AbstractWriterMultiSheets; 10 use OpenSpout\Writer\Common\Entity\Workbook; 11 use OpenSpout\Writer\Common\Helper\ZipHelper; 12 use OpenSpout\Writer\Common\Manager\Style\StyleMerger; 13 use OpenSpout\Writer\XLSX\Helper\FileSystemHelper; 14 use OpenSpout\Writer\XLSX\Manager\CommentsManager; 15 use OpenSpout\Writer\XLSX\Manager\SharedStringsManager; 16 use OpenSpout\Writer\XLSX\Manager\Style\StyleManager; 17 use OpenSpout\Writer\XLSX\Manager\Style\StyleRegistry; 18 use OpenSpout\Writer\XLSX\Manager\WorkbookManager; 19 use OpenSpout\Writer\XLSX\Manager\WorksheetManager; 20 21 final class Writer extends AbstractWriterMultiSheets 22 { 23 /** @var string Content-Type value for the header */ 24 protected static string $headerContentType = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; 25 26 private Options $options; 27 28 public function __construct(?Options $options = null) 29 { 30 $this->options = $options ?? new Options(); 31 } 32 33 public function getOptions(): Options 34 { 35 return $this->options; 36 } 37 38 protected function createWorkbookManager(): WorkbookManager 39 { 40 $workbook = new Workbook(); 41 42 $fileSystemHelper = new FileSystemHelper( 43 $this->options->getTempFolder(), 44 new ZipHelper(), 45 new XLSX() 46 ); 47 $fileSystemHelper->createBaseFilesAndFolders(); 48 49 $xlFolder = $fileSystemHelper->getXlFolder(); 50 $sharedStringsManager = new SharedStringsManager($xlFolder, new XLSX()); 51 52 $styleMerger = new StyleMerger(); 53 $styleManager = new StyleManager(new StyleRegistry($this->options->DEFAULT_ROW_STYLE)); 54 55 $commentsManager = new CommentsManager($xlFolder, new XLSX()); 56 57 $worksheetManager = new WorksheetManager( 58 $this->options, 59 $styleManager, 60 $styleMerger, 61 $commentsManager, 62 $sharedStringsManager, 63 new XLSX(), 64 StringHelper::factory() 65 ); 66 67 return new WorkbookManager( 68 $workbook, 69 $this->options, 70 $worksheetManager, 71 $styleManager, 72 $styleMerger, 73 $fileSystemHelper 74 ); 75 } 76 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body