You are here

public function PHPExcel_Writer_Excel2007::__construct in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007.php \PHPExcel_Writer_Excel2007::__construct()

Create a new PHPExcel_Writer_Excel2007

*

Parameters

PHPExcel $pPHPExcel:

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007.php, line 131

Class

PHPExcel_Writer_Excel2007
PHPExcel_Writer_Excel2007

Code

public function __construct(PHPExcel $pPHPExcel = null) {

  // Assign PHPExcel
  $this
    ->setPHPExcel($pPHPExcel);
  $writerPartsArray = array(
    'stringtable' => 'PHPExcel_Writer_Excel2007_StringTable',
    'contenttypes' => 'PHPExcel_Writer_Excel2007_ContentTypes',
    'docprops' => 'PHPExcel_Writer_Excel2007_DocProps',
    'rels' => 'PHPExcel_Writer_Excel2007_Rels',
    'theme' => 'PHPExcel_Writer_Excel2007_Theme',
    'style' => 'PHPExcel_Writer_Excel2007_Style',
    'workbook' => 'PHPExcel_Writer_Excel2007_Workbook',
    'worksheet' => 'PHPExcel_Writer_Excel2007_Worksheet',
    'drawing' => 'PHPExcel_Writer_Excel2007_Drawing',
    'comments' => 'PHPExcel_Writer_Excel2007_Comments',
    'chart' => 'PHPExcel_Writer_Excel2007_Chart',
    'relsvba' => 'PHPExcel_Writer_Excel2007_RelsVBA',
    'relsribbonobjects' => 'PHPExcel_Writer_Excel2007_RelsRibbon',
  );

  //	Initialise writer parts
  //		and Assign their parent IWriters
  foreach ($writerPartsArray as $writer => $class) {
    $this->_writerParts[$writer] = new $class($this);
  }
  $hashTablesArray = array(
    '_stylesConditionalHashTable',
    '_fillHashTable',
    '_fontHashTable',
    '_bordersHashTable',
    '_numFmtHashTable',
    '_drawingHashTable',
    '_styleHashTable',
  );

  // Set HashTable variables
  foreach ($hashTablesArray as $tableName) {
    $this->{$tableName} = new PHPExcel_HashTable();
  }
}