1 <?php 2 3 namespace Box\Spout\Writer\Common\Creator; 4 5 use Box\Spout\Writer\Common\Entity\Sheet; 6 use Box\Spout\Writer\Common\Entity\Workbook; 7 use Box\Spout\Writer\Common\Entity\Worksheet; 8 use Box\Spout\Writer\Common\Manager\SheetManager; 9 10 /** 11 * Class InternalEntityFactory 12 * Factory to create internal entities 13 */ 14 class InternalEntityFactory 15 { 16 /** 17 * @return Workbook 18 */ 19 public function createWorkbook() 20 { 21 return new Workbook(); 22 } 23 24 /** 25 * @param string $worksheetFilePath 26 * @param Sheet $externalSheet 27 * @return Worksheet 28 */ 29 public function createWorksheet($worksheetFilePath, Sheet $externalSheet) 30 { 31 return new Worksheet($worksheetFilePath, $externalSheet); 32 } 33 34 /** 35 * @param int $sheetIndex Index of the sheet, based on order in the workbook (zero-based) 36 * @param string $associatedWorkbookId ID of the sheet's associated workbook 37 * @param SheetManager $sheetManager To manage sheets 38 * @return Sheet 39 */ 40 public function createSheet($sheetIndex, $associatedWorkbookId, $sheetManager) 41 { 42 return new Sheet($sheetIndex, $associatedWorkbookId, $sheetManager); 43 } 44 45 /** 46 * @return \ZipArchive 47 */ 48 public function createZipArchive() 49 { 50 return new \ZipArchive(); 51 } 52 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body