PHP Class Box\Spout\Writer\XLSX\Helper\FileSystemHelper

Inheritance: extends Box\Spout\Common\Helper\FileSystemHelper
Show file Open project: box/spout

Protected Properties

Property Type Description
$docPropsFolder Path to the "docProps" folder inside the root folder
$relsFolder Path to the "_rels" folder inside the root folder
$rootFolder Path to the root folder inside the temp folder where the files to create the XLSX will be stored
$xlFolder Path to the "xl" folder inside the root folder
$xlRelsFolder Path to the "_rels" folder inside the "xl" folder
$xlWorksheetsFolder Path to the "worksheets" folder inside the "xl" folder

Public Methods

Method Description
createBaseFilesAndFolders ( ) : void Creates all the folders needed to create a XLSX file, as well as the files that won't change.
createContentTypesFile ( Worksheet[] $worksheets ) : FileSystemHelper Creates the "[Content_Types].xml" file under the root folder
createStylesFile ( Box\Spout\Writer\XLSX\Helper\StyleHelper $styleHelper ) : FileSystemHelper Creates the "styles.xml" file under the "xl" folder
createWorkbookFile ( Worksheet[] $worksheets ) : FileSystemHelper Creates the "workbook.xml" file under the "xl" folder
createWorkbookRelsFile ( Worksheet[] $worksheets ) : FileSystemHelper Creates the "workbook.xml.res" file under the "xl/_res" folder
getRootFolder ( ) : string
getXlFolder ( ) : string
getXlWorksheetsFolder ( ) : string
zipRootFolderAndCopyToStream ( resource $streamPointer ) : void Zips the root folder and streams the contents of the zip into the given stream

Protected Methods

Method Description
createAppXmlFile ( ) : FileSystemHelper Creates the "app.xml" file under the "docProps" folder
createCoreXmlFile ( ) : FileSystemHelper Creates the "core.xml" file under the "docProps" folder
createDocPropsFolderAndFiles ( ) : FileSystemHelper Creates the "docProps" folder under the root folder as well as the "app.xml" and "core.xml" files in it
createRelsFile ( ) : FileSystemHelper Creates the ".rels" file under the "_rels" folder (under root)
createRelsFolderAndFile ( ) : FileSystemHelper Creates the "_rels" folder under the root folder as well as the ".rels" file in it
createRootFolder ( ) : FileSystemHelper Creates the folder that will be used as root
createXlFolderAndSubFolders ( ) : FileSystemHelper Creates the "xl" folder under the root folder as well as its subfolders
createXlRelsFolder ( ) : FileSystemHelper Creates the "_rels" folder under the "xl" folder
createXlWorksheetsFolder ( ) : FileSystemHelper Creates the "worksheets" folder under the "xl" folder

Method Details

createAppXmlFile() protected method

Creates the "app.xml" file under the "docProps" folder
protected createAppXmlFile ( ) : FileSystemHelper
return FileSystemHelper

createBaseFilesAndFolders() public method

Creates all the folders needed to create a XLSX file, as well as the files that won't change.
public createBaseFilesAndFolders ( ) : void
return void

createContentTypesFile() public method

Creates the "[Content_Types].xml" file under the root folder
public createContentTypesFile ( Worksheet[] $worksheets ) : FileSystemHelper
$worksheets Box\Spout\Writer\XLSX\Internal\Worksheet[]
return FileSystemHelper

createCoreXmlFile() protected method

Creates the "core.xml" file under the "docProps" folder
protected createCoreXmlFile ( ) : FileSystemHelper
return FileSystemHelper

createDocPropsFolderAndFiles() protected method

Creates the "docProps" folder under the root folder as well as the "app.xml" and "core.xml" files in it
protected createDocPropsFolderAndFiles ( ) : FileSystemHelper
return FileSystemHelper

createRelsFile() protected method

Creates the ".rels" file under the "_rels" folder (under root)
protected createRelsFile ( ) : FileSystemHelper
return FileSystemHelper

createRelsFolderAndFile() protected method

Creates the "_rels" folder under the root folder as well as the ".rels" file in it
protected createRelsFolderAndFile ( ) : FileSystemHelper
return FileSystemHelper

createRootFolder() protected method

Creates the folder that will be used as root
protected createRootFolder ( ) : FileSystemHelper
return FileSystemHelper

createStylesFile() public method

Creates the "styles.xml" file under the "xl" folder
public createStylesFile ( Box\Spout\Writer\XLSX\Helper\StyleHelper $styleHelper ) : FileSystemHelper
$styleHelper Box\Spout\Writer\XLSX\Helper\StyleHelper
return FileSystemHelper

createWorkbookFile() public method

Creates the "workbook.xml" file under the "xl" folder
public createWorkbookFile ( Worksheet[] $worksheets ) : FileSystemHelper
$worksheets Box\Spout\Writer\XLSX\Internal\Worksheet[]
return FileSystemHelper

createWorkbookRelsFile() public method

Creates the "workbook.xml.res" file under the "xl/_res" folder
public createWorkbookRelsFile ( Worksheet[] $worksheets ) : FileSystemHelper
$worksheets Box\Spout\Writer\XLSX\Internal\Worksheet[]
return FileSystemHelper

createXlFolderAndSubFolders() protected method

Creates the "xl" folder under the root folder as well as its subfolders
protected createXlFolderAndSubFolders ( ) : FileSystemHelper
return FileSystemHelper

createXlRelsFolder() protected method

Creates the "_rels" folder under the "xl" folder
protected createXlRelsFolder ( ) : FileSystemHelper
return FileSystemHelper

createXlWorksheetsFolder() protected method

Creates the "worksheets" folder under the "xl" folder
protected createXlWorksheetsFolder ( ) : FileSystemHelper
return FileSystemHelper

getRootFolder() public method

public getRootFolder ( ) : string
return string

getXlFolder() public method

public getXlFolder ( ) : string
return string

getXlWorksheetsFolder() public method

public getXlWorksheetsFolder ( ) : string
return string

zipRootFolderAndCopyToStream() public method

Zips the root folder and streams the contents of the zip into the given stream
public zipRootFolderAndCopyToStream ( resource $streamPointer ) : void
$streamPointer resource Pointer to the stream to copy the zip
return void

Property Details

$docPropsFolder protected property

Path to the "docProps" folder inside the root folder
protected $docPropsFolder

$relsFolder protected property

Path to the "_rels" folder inside the root folder
protected $relsFolder

$rootFolder protected property

Path to the root folder inside the temp folder where the files to create the XLSX will be stored
protected $rootFolder

$xlFolder protected property

Path to the "xl" folder inside the root folder
protected $xlFolder

$xlRelsFolder protected property

Path to the "_rels" folder inside the "xl" folder
protected $xlRelsFolder

$xlWorksheetsFolder protected property

Path to the "worksheets" folder inside the "xl" folder
protected $xlWorksheetsFolder