Fixes to ZipArchive cass when PCLZip being used
Fixes to default arguments when typehinted arguments in Chart writer are null values Fix to gitignore for Examples folder/subfolders
This commit is contained in:
parent
2da06e5b03
commit
8569f04090
|
@ -2,4 +2,11 @@
|
|||
*.xlsx
|
||||
*.csv
|
||||
*.jpg
|
||||
*.pdf
|
||||
*.pdf
|
||||
*.htm
|
||||
*.html
|
||||
*.log
|
||||
!.gitignore
|
||||
!data/**
|
||||
!images/**
|
||||
!templates/**
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -76,7 +76,8 @@ class File
|
|||
$zipFile = substr($pFilename, 6, strpos($pFilename, '#') - 6);
|
||||
$archiveFile = substr($pFilename, strpos($pFilename, '#') + 1);
|
||||
|
||||
$zip = new ZipArchive();
|
||||
$zipClass = \PHPExcel\Settings::getZipClass();
|
||||
$zip = new $zipClass();
|
||||
if ($zip->open($zipFile) === true) {
|
||||
$returnValue = ($zip->getFromName($archiveFile) !== false);
|
||||
$zip->close();
|
||||
|
|
|
@ -501,4 +501,3 @@ necessary. Here is a sample; alter the names:
|
|||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
|
|
|
@ -88,7 +88,8 @@ class ZipStreamWrapper
|
|||
$url['fragment'] = substr($path, $pos + 1);
|
||||
|
||||
// Open archive
|
||||
$this->archive = new ZipArchive();
|
||||
$zipClass = \PHPExcel\Settings::getZipClass();
|
||||
$this->archive = new $zipClass();
|
||||
$this->archive->open($url['host']);
|
||||
|
||||
$this->fileNameInArchive = $url['fragment'];
|
||||
|
|
|
@ -351,7 +351,8 @@ class Excel2007 extends BaseWriter implements IWriter
|
|||
$imagePath = substr($imagePath, 6);
|
||||
$imagePathSplitted = explode('#', $imagePath);
|
||||
|
||||
$imageZip = new ZipArchive();
|
||||
$zipClass = \PHPExcel\Settings::getZipClass();
|
||||
$imageZip = new $zipClass();
|
||||
$imageZip->open($imagePathSplitted[0]);
|
||||
$imageContents = $imageZip->getFromName($imagePathSplitted[1]);
|
||||
$imageZip->close();
|
||||
|
|
|
@ -126,7 +126,7 @@ class Chart extends WriterPart
|
|||
*
|
||||
* @throws \PHPExcel\Writer\Exception
|
||||
*/
|
||||
private function writeTitle(Title $title, $objWriter)
|
||||
private function writeTitle(Title $title=null, $objWriter)
|
||||
{
|
||||
if (is_null($title)) {
|
||||
return;
|
||||
|
@ -171,7 +171,7 @@ class Chart extends WriterPart
|
|||
*
|
||||
* @throws \PHPExcel\Writer\Exception
|
||||
*/
|
||||
private function writeLegend(Legend $legend, $objWriter)
|
||||
private function writeLegend(Legend $legend=null, $objWriter)
|
||||
{
|
||||
if (is_null($legend)) {
|
||||
return;
|
||||
|
@ -226,7 +226,7 @@ class Chart extends WriterPart
|
|||
*
|
||||
* @throws \PHPExcel\Writer\Exception
|
||||
*/
|
||||
private function writePlotArea(PlotArea $plotArea, Title $xAxisLabel, Title $yAxisLabel, $objWriter, \PHPExcel\Worksheet $pSheet, Axis $xAxis, Axis $yAxis, GridLines $majorGridlines, GridLines $minorGridlines)
|
||||
private function writePlotArea(PlotArea $plotArea, Title $xAxisLabel=null, Title $yAxisLabel=null, $objWriter, \PHPExcel\Worksheet $pSheet, Axis $xAxis=null, Axis $yAxis=null, GridLines $majorGridlines=null, GridLines $minorGridlines=null)
|
||||
{
|
||||
if (is_null($plotArea)) {
|
||||
return;
|
||||
|
@ -361,7 +361,7 @@ class Chart extends WriterPart
|
|||
*
|
||||
* @throws \PHPExcel\Writer\Exception
|
||||
*/
|
||||
private function writeDataLabels($objWriter, $chartLayout)
|
||||
private function writeDataLabels($objWriter, Layout $chartLayout=null)
|
||||
{
|
||||
$objWriter->startElement('c:dLbls');
|
||||
|
||||
|
@ -1404,7 +1404,7 @@ class Chart extends WriterPart
|
|||
*
|
||||
* @throws \PHPExcel\Writer\Exception
|
||||
*/
|
||||
private function writeLayout(Layout $layout, $objWriter)
|
||||
private function writeLayout(Layout $layout=null, $objWriter)
|
||||
{
|
||||
$objWriter->startElement('c:layout');
|
||||
|
||||
|
|
Loading…
Reference in New Issue