Revert references to classes in global namespace

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
This commit is contained in:
Adrien Crivelli 2016-11-16 22:43:44 +09:00
parent 1df5f97a5b
commit 6d8ba6f7f0
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
4 changed files with 4 additions and 4 deletions

View File

@ -253,7 +253,7 @@ class Memcache extends CacheBase implements ICache
$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}");
}

View File

@ -88,7 +88,7 @@ class DomPDF extends Core implements \PhpOffice\PhpSpreadsheet\Writer\IWriter
}
// Create PDF
$pdf = new self();
$pdf = new \DOMPDF();
$pdf->set_paper(strtolower($paperSize), $orientation);
$pdf->load_html(

View File

@ -89,7 +89,7 @@ class MPDF extends Core implements \PhpOffice\PhpSpreadsheet\Writer\IWriter
}
// Create PDF
$pdf = new self();
$pdf = new \Mpdf\Mpdf();
$ortmp = $orientation;
$pdf->_setPageSize(strtoupper($paperSize), $ortmp);
$pdf->DefOrientation = $orientation;

View File

@ -87,7 +87,7 @@ class TcPDF extends Core implements \PhpOffice\PhpSpreadsheet\Writer\IWriter
}
// 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);