diff --git a/Documentation/Examples/Reader/exampleReader16.php b/Documentation/Examples/Reader/exampleReader16.php index 62d82ea9..24301e27 100644 --- a/Documentation/Examples/Reader/exampleReader16.php +++ b/Documentation/Examples/Reader/exampleReader16.php @@ -30,7 +30,7 @@ $inputFileName = './sampleData/example_1.xls'; echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory to identify the format
'; try { $objPHPExcel = PHPExcel_IOFactory::load($inputFileName); -} catch(PHPExcel_Reader_Exception $e) { +} catch(\PHPExcel\Reader\Exception $e) { die('Error loading file "'.pathinfo($inputFileName,PATHINFO_BASENAME).'": '.$e->getMessage()); } diff --git a/src/PhpSpreadsheet/Reader/Exception.php b/src/PhpSpreadsheet/Reader/Exception.php index 2b68d33a..26418702 100644 --- a/src/PhpSpreadsheet/Reader/Exception.php +++ b/src/PhpSpreadsheet/Reader/Exception.php @@ -3,7 +3,7 @@ namespace PHPExcel\Reader; /** - * PHPExcel_Reader_Exception + * \PHPExcel\Reader\Exception * * Copyright (c) 2006 - 2015 PHPExcel * diff --git a/src/PhpSpreadsheet/Shared/CodePage.php b/src/PhpSpreadsheet/Shared/CodePage.php index 1aa6829c..76c60151 100644 --- a/src/PhpSpreadsheet/Shared/CodePage.php +++ b/src/PhpSpreadsheet/Shared/CodePage.php @@ -3,7 +3,7 @@ namespace PHPExcel\Shared; /** - * PHPExcel_Shared_CodePage + * \PHPExcel\Shared\CodePage * * Copyright (c) 2006 - 2015 PHPExcel * diff --git a/src/PhpSpreadsheet/Shared/File.php b/src/PhpSpreadsheet/Shared/File.php index 4e90b354..02c8f33e 100644 --- a/src/PhpSpreadsheet/Shared/File.php +++ b/src/PhpSpreadsheet/Shared/File.php @@ -3,7 +3,7 @@ namespace PHPExcel\Shared; /** - * PHPExcel_Shared_File + * \PHPExcel\Shared\File * * Copyright (c) 2006 - 2015 PHPExcel * diff --git a/src/PhpSpreadsheet/Shared/PasswordHasher.php b/src/PhpSpreadsheet/Shared/PasswordHasher.php index 80181201..8ec530c1 100644 --- a/src/PhpSpreadsheet/Shared/PasswordHasher.php +++ b/src/PhpSpreadsheet/Shared/PasswordHasher.php @@ -3,7 +3,7 @@ namespace PHPExcel\Shared; /** - * PHPExcel_Shared_PasswordHasher + * \PHPExcel\Shared\PasswordHasher * * Copyright (c) 2006 - 2015 PHPExcel * diff --git a/src/PhpSpreadsheet/Style/NumberFormat.php b/src/PhpSpreadsheet/Style/NumberFormat.php index 7ea7f2b9..effc292b 100644 --- a/src/PhpSpreadsheet/Style/NumberFormat.php +++ b/src/PhpSpreadsheet/Style/NumberFormat.php @@ -3,7 +3,7 @@ namespace PHPExcel\Style; /** - * PHPExcel_Style_NumberFormat + * \PHPExcel\Style\NumberFormat * * Copyright (c) 2006 - 2015 PHPExcel * diff --git a/src/PhpSpreadsheet/Worksheet/RowIterator.php b/src/PhpSpreadsheet/Worksheet/RowIterator.php index 98ff0133..299f77e1 100644 --- a/src/PhpSpreadsheet/Worksheet/RowIterator.php +++ b/src/PhpSpreadsheet/Worksheet/RowIterator.php @@ -87,12 +87,12 @@ class RowIterator implements \Iterator * * @param integer $startRow The row number at which to start iterating * @return RowIterator - * @throws PHPExcel_Exception + * @throws \PHPExcel\Exception */ public function resetStart($startRow = 1) { if ($startRow > $this->subject->getHighestRow()) { - throw new PHPExcel_Exception("Start row ({$startRow}) is beyond highest row ({$this->subject->getHighestRow()})"); + throw new \PHPExcel\Exception("Start row ({$startRow}) is beyond highest row ({$this->subject->getHighestRow()})"); } $this->startRow = $startRow; diff --git a/src/PhpSpreadsheet/Writer/Excel2007.php b/src/PhpSpreadsheet/Writer/Excel2007.php index b7375644..01c688bc 100644 --- a/src/PhpSpreadsheet/Writer/Excel2007.php +++ b/src/PhpSpreadsheet/Writer/Excel2007.php @@ -179,7 +179,7 @@ class Excel2007 extends BaseWriter implements IWriter // If $pFilename is php://output or php://stdout, make it a temporary file... $originalFilename = $pFilename; if (strtolower($pFilename) == 'php://output' || strtolower($pFilename) == 'php://stdout') { - $pFilename = @tempnam(PHPExcel_Shared_File::sysGetTempDir(), 'phpxltmp'); + $pFilename = @tempnam(\PHPExcel\Shared\File::sysGetTempDir(), 'phpxltmp'); if ($pFilename == '') { $pFilename = $originalFilename; } diff --git a/src/PhpSpreadsheet/Writer/HTML.php b/src/PhpSpreadsheet/Writer/HTML.php index efc6f71f..b3439fd9 100644 --- a/src/PhpSpreadsheet/Writer/HTML.php +++ b/src/PhpSpreadsheet/Writer/HTML.php @@ -702,7 +702,7 @@ class HTML extends BaseWriter implements IWriter if ($chart instanceof PHPExcel_Chart) { $chartCoordinates = $chart->getTopLeftPosition(); if ($chartCoordinates['cell'] == $coordinates) { - $chartFileName = PHPExcel_Shared_File::sysGetTempDir().'/'.uniqid().'.png'; + $chartFileName = \PHPExcel\Shared\File::sysGetTempDir().'/'.uniqid().'.png'; if (!$chart->render($chartFileName)) { return; } diff --git a/src/PhpSpreadsheet/Writer/OpenDocument.php b/src/PhpSpreadsheet/Writer/OpenDocument.php index 5f61bf27..73b8eb82 100644 --- a/src/PhpSpreadsheet/Writer/OpenDocument.php +++ b/src/PhpSpreadsheet/Writer/OpenDocument.php @@ -100,7 +100,7 @@ class OpenDocument extends BaseWriter implements IWriter // If $pFilename is php://output or php://stdout, make it a temporary file... $originalFilename = $pFilename; if (strtolower($pFilename) == 'php://output' || strtolower($pFilename) == 'php://stdout') { - $pFilename = @tempnam(PHPExcel_Shared_File::sysGetTempDir(), 'phpxltmp'); + $pFilename = @tempnam(\PHPExcel\Shared\File::sysGetTempDir(), 'phpxltmp'); if ($pFilename == '') { $pFilename = $originalFilename; } diff --git a/src/PhpSpreadsheet/Writer/PDF/Core.php b/src/PhpSpreadsheet/Writer/PDF/Core.php index b023117e..81fb90a1 100644 --- a/src/PhpSpreadsheet/Writer/PDF/Core.php +++ b/src/PhpSpreadsheet/Writer/PDF/Core.php @@ -214,7 +214,7 @@ abstract class Core extends \PHPExcel\Writer\HTML { parent::__construct($phpExcel); $this->setUseInlineCss(true); - $this->tempDir = PHPExcel_Shared_File::sysGetTempDir(); + $this->tempDir = \PHPExcel\Shared\File::sysGetTempDir(); } /** diff --git a/unitTests/Classes/src/Reader/XEEValidatorTest.php b/unitTests/Classes/src/Reader/XEEValidatorTest.php index deba3804..d408994f 100644 --- a/unitTests/Classes/src/Reader/XEEValidatorTest.php +++ b/unitTests/Classes/src/Reader/XEEValidatorTest.php @@ -6,11 +6,11 @@ class XEEValidatorTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider providerInvalidXML - * @expectedException PHPExcel_Reader_Exception + * @expectedException \PHPExcel\Reader\Exception */ public function testInvalidXML($filename) { - $reader = $this->getMockForAbstractClass('PHPExcel_Reader_Abstract'); + $reader = $this->getMockForAbstractClass('\PHPExcel\Reader\BaseReader'); $expectedResult = 'FAILURE: Should throw an Exception rather than return a value'; $result = $reader->securityScanFile($filename); $this->assertEquals($expectedResult, $result); @@ -30,7 +30,7 @@ class XEEValidatorTest extends \PHPUnit_Framework_TestCase */ public function testValidXML($filename, $expectedResult) { - $reader = $this->getMockForAbstractClass('PHPExcel_Reader_Abstract'); + $reader = $this->getMockForAbstractClass('\PHPExcel\Reader\BaseReader'); $result = $reader->securityScanFile($filename); $this->assertEquals($expectedResult, $result); } diff --git a/unitTests/Classes/src/Shared/CodePageTest.php b/unitTests/Classes/src/Shared/CodePageTest.php index db91a440..38544366 100644 --- a/unitTests/Classes/src/Shared/CodePageTest.php +++ b/unitTests/Classes/src/Shared/CodePageTest.php @@ -13,7 +13,7 @@ class CodePageTest extends \PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Shared_CodePage','numberToName'), $args); + $result = call_user_func_array(array('\PHPExcel\Shared\CodePage','numberToName'), $args); $this->assertEquals($expectedResult, $result); } @@ -26,7 +26,7 @@ class CodePageTest extends \PHPUnit_Framework_TestCase { $invalidCodePage = 12345; try { - $result = call_user_func(array('PHPExcel_Shared_CodePage','numberToName'), $invalidCodePage); + $result = call_user_func(array('\PHPExcel\Shared\CodePage','numberToName'), $invalidCodePage); } catch (Exception $e) { $this->assertEquals($e->getMessage(), 'Unknown codepage: 12345'); return; @@ -38,7 +38,7 @@ class CodePageTest extends \PHPUnit_Framework_TestCase { $unsupportedCodePage = 720; try { - $result = call_user_func(array('PHPExcel_Shared_CodePage','numberToName'), $unsupportedCodePage); + $result = call_user_func(array('\PHPExcel\Shared\CodePage','numberToName'), $unsupportedCodePage); } catch (Exception $e) { $this->assertEquals($e->getMessage(), 'Code page 720 not supported.'); return; diff --git a/unitTests/Classes/src/Shared/FileTest.php b/unitTests/Classes/src/Shared/FileTest.php index b7a525d1..70c9758f 100644 --- a/unitTests/Classes/src/Shared/FileTest.php +++ b/unitTests/Classes/src/Shared/FileTest.php @@ -10,7 +10,7 @@ class FileTest extends \PHPUnit_Framework_TestCase { $expectedResult = false; - $result = call_user_func(array('PHPExcel_Shared_File','getUseUploadTempDirectory')); + $result = call_user_func(array('\PHPExcel\Shared\File','getUseUploadTempDirectory')); $this->assertEquals($expectedResult, $result); } @@ -22,9 +22,9 @@ class FileTest extends \PHPUnit_Framework_TestCase ); foreach ($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) { - call_user_func(array('PHPExcel_Shared_File','setUseUploadTempDirectory'), $useUploadTempDirectoryValue); + call_user_func(array('\PHPExcel\Shared\File','setUseUploadTempDirectory'), $useUploadTempDirectoryValue); - $result = call_user_func(array('PHPExcel_Shared_File','getUseUploadTempDirectory')); + $result = call_user_func(array('\PHPExcel\Shared\File','getUseUploadTempDirectory')); $this->assertEquals($useUploadTempDirectoryValue, $result); } } diff --git a/unitTests/Classes/src/Shared/PasswordHasherTest.php b/unitTests/Classes/src/Shared/PasswordHasherTest.php index 7cec0492..b64b6d40 100644 --- a/unitTests/Classes/src/Shared/PasswordHasherTest.php +++ b/unitTests/Classes/src/Shared/PasswordHasherTest.php @@ -13,7 +13,7 @@ class PasswordHasherTest extends \PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Shared_PasswordHasher','hashPassword'), $args); + $result = call_user_func_array(array('\PHPExcel\Shared\PasswordHasher','hashPassword'), $args); $this->assertEquals($expectedResult, $result); } diff --git a/unitTests/Classes/src/Style/NumberFormatDateTest.php b/unitTests/Classes/src/Style/NumberFormatDateTest.php index 8bbb28d4..998a7ce4 100644 --- a/unitTests/Classes/src/Style/NumberFormatDateTest.php +++ b/unitTests/Classes/src/Style/NumberFormatDateTest.php @@ -20,7 +20,7 @@ class NumberFormatDateTest extends \PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Style_NumberFormat','toFormattedString'), $args); + $result = call_user_func_array(array('\PHPExcel\Style\NumberFormat','toFormattedString'), $args); $this->assertEquals($expectedResult, $result); } diff --git a/unitTests/Classes/src/Style/NumberFormatTest.php b/unitTests/Classes/src/Style/NumberFormatTest.php index e723d714..01b89fed 100644 --- a/unitTests/Classes/src/Style/NumberFormatTest.php +++ b/unitTests/Classes/src/Style/NumberFormatTest.php @@ -20,7 +20,7 @@ class NumberFormatTest extends \PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Style_NumberFormat','toFormattedString'), $args); + $result = call_user_func_array(array('\PHPExcel\Style\NumberFormat','toFormattedString'), $args); $this->assertEquals($expectedResult, $result); } diff --git a/unitTests/Classes/src/Worksheet/AutoFilter/ColumnTest.php b/unitTests/Classes/src/Worksheet/AutoFilter/ColumnTest.php index 258f248a..04ba1854 100644 --- a/unitTests/Classes/src/Worksheet/AutoFilter/ColumnTest.php +++ b/unitTests/Classes/src/Worksheet/AutoFilter/ColumnTest.php @@ -73,7 +73,7 @@ class AutofilterColumnTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException PHPExcel_Exception + * @expectedException \PHPExcel\Exception */ public function testSetInvalidFilterTypeThrowsException() { @@ -98,7 +98,7 @@ class AutofilterColumnTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException PHPExcel_Exception + * @expectedException \PHPExcel\Exception */ public function testSetInvalidJoinThrowsException() { diff --git a/unitTests/Classes/src/Worksheet/RowCellIteratorTest.php b/unitTests/Classes/src/Worksheet/RowCellIteratorTest.php index 098d6b98..58dca140 100644 --- a/unitTests/Classes/src/Worksheet/RowCellIteratorTest.php +++ b/unitTests/Classes/src/Worksheet/RowCellIteratorTest.php @@ -66,7 +66,7 @@ class RowCellIteratorTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException PHPExcel_Exception + * @expectedException \PHPExcel\Exception */ public function testSeekOutOfRange() { @@ -75,7 +75,7 @@ class RowCellIteratorTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException PHPExcel_Exception + * @expectedException \PHPExcel\Exception */ public function testPrevOutOfRange() { diff --git a/unitTests/Classes/src/Worksheet/RowIteratorTest.php b/unitTests/Classes/src/Worksheet/RowIteratorTest.php index c81c2670..65c41c12 100644 --- a/unitTests/Classes/src/Worksheet/RowIteratorTest.php +++ b/unitTests/Classes/src/Worksheet/RowIteratorTest.php @@ -64,7 +64,7 @@ class RowIteratorTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException PHPExcel_Exception + * @expectedException \PHPExcel\Exception */ public function testSeekOutOfRange() { @@ -73,7 +73,7 @@ class RowIteratorTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException PHPExcel_Exception + * @expectedException \PHPExcel\Exception */ public function testPrevOutOfRange() {