Skip to content

Commit

Permalink
Revert references to classes in global namespace
Browse files Browse the repository at this point in the history
Some references to classes were incorrectly assumed to be a reference
to self, whereas they were references to classes in global namespace
outside of this project.

FIX #37
  • Loading branch information
PowerKiKi committed Nov 16, 2016
1 parent 1df5f97 commit 6d8ba6f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/CachedObjectStorage/Memcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public function __construct(\PhpOffice\PhpSpreadsheet\Worksheet $parent, $argume
$this->cachePrefix = substr(md5($baseUnique), 0, 8) . '.';

// Set a new Memcache object and connect to the Memcache server
$this->memcache = new self();
$this->memcache = new \Memcache();
if (!$this->memcache->addServer($memcacheServer, $memcachePort, false, 50, 5, 5, true, [$this, 'failureCallback'])) {
throw new \PhpOffice\PhpSpreadsheet\Exception("Could not connect to MemCache server at {$memcacheServer}:{$memcachePort}");
}
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Writer/PDF/DomPDF.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function save($pFilename = null)
}

// Create PDF
$pdf = new self();
$pdf = new \DOMPDF();
$pdf->set_paper(strtolower($paperSize), $orientation);

$pdf->load_html(
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Writer/PDF/MPDF.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function save($pFilename = null)
}

// Create PDF
$pdf = new self();
$pdf = new \Mpdf\Mpdf();
$ortmp = $orientation;
$pdf->_setPageSize(strtoupper($paperSize), $ortmp);
$pdf->DefOrientation = $orientation;
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Writer/PDF/TcPDF.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function save($pFilename = null)
}

// Create PDF
$pdf = new self($orientation, 'pt', $paperSize);
$pdf = new \TCPDF($orientation, 'pt', $paperSize);
$pdf->setFontSubsetting(false);
// Set margins, converting inches to points (using 72 dpi)
$pdf->SetMargins($printMargins->getLeft() * 72, $printMargins->getTop() * 72, $printMargins->getRight() * 72);
Expand Down

0 comments on commit 6d8ba6f

Please sign in to comment.