Changed PHPWord namespace to PhpOffice\PhpWord

This commit is contained in:
Gabriel Bull 2014-03-09 16:05:50 -04:00
parent 79ba793294
commit f2122c152a
5 changed files with 9 additions and 9 deletions

View File

@ -36,7 +36,7 @@ if (!defined('PHPWORD_BASE_PATH')) {
*/ */
class PHPWord_Autoloader class PHPWord_Autoloader
{ {
const PREFIX = 'PHPWord'; const PREFIX = 'PhpOffice\PhpWord';
/** /**
* Register the autoloader * Register the autoloader

View File

@ -1,5 +1,5 @@
<?php <?php
namespace PHPWord\Exceptions; namespace PhpOffice\PhpWord\Exceptions;
use InvalidArgumentException; use InvalidArgumentException;

View File

@ -25,7 +25,7 @@
* @version 0.7.0 * @version 0.7.0
*/ */
use PHPWord\Exceptions\InvalidStyleException; use PhpOffice\PhpWord\Exceptions\InvalidStyleException;
/** /**
* Class PHPWord_Style_Font * Class PHPWord_Style_Font
@ -488,7 +488,7 @@ class PHPWord_Style_Font
* *
* @param int|float|string $lineHeight * @param int|float|string $lineHeight
* @return $this * @return $this
* @throws \PHPWord\Exceptions\InvalidStyleException * @throws InvalidStyleException
*/ */
public function setLineHeight($lineHeight) public function setLineHeight($lineHeight)
{ {

View File

@ -25,7 +25,7 @@
* @version 0.7.0 * @version 0.7.0
*/ */
use PHPWord\Exceptions\InvalidStyleException; use PhpOffice\PhpWord\Exceptions\InvalidStyleException;
/** /**
* PHPWord_Style_Paragraph * PHPWord_Style_Paragraph
@ -482,7 +482,7 @@ class PHPWord_Style_Paragraph
* *
* @param int|float|string $lineHeight * @param int|float|string $lineHeight
* @return $this * @return $this
* @throws \PHPWord\Exceptions\InvalidStyleException * @throws InvalidStyleException
*/ */
public function setLineHeight($lineHeight) public function setLineHeight($lineHeight)
{ {

View File

@ -25,8 +25,8 @@ class AutoloaderTest extends PHPUnit_Framework_TestCase
$declared = get_declared_classes(); $declared = get_declared_classes();
$declaredCount = count($declared); $declaredCount = count($declared);
Autoloader::autoload('Foo'); Autoloader::autoload('Foo');
$this->assertEquals($declaredCount, count(get_declared_classes()), 'PHPWord\\Autoloader::autoload() is trying to load classes outside of the PHPWord namespace'); $this->assertEquals($declaredCount, count(get_declared_classes()), 'PhpOffice\\PhpWord\\Autoloader::autoload() is trying to load classes outside of the PhpOffice\\PhpWord namespace');
Autoloader::autoload('PHPWord\\Exceptions\\InvalidStyleException'); // TODO change this class to the main PHPWord class when it is namespaced Autoloader::autoload('PhpOffice\\PhpWord\\Exceptions\\InvalidStyleException'); // TODO change this class to the main PHPWord class when it is namespaced
$this->assertTrue(in_array('PHPWord\\Exceptions\\InvalidStyleException', get_declared_classes()), 'PHPWord\\Autoloader::autoload() failed to autoload the PHPWord\\Exceptions\\InvalidStyleException class'); $this->assertTrue(in_array('PhpOffice\\PhpWord\\Exceptions\\InvalidStyleException', get_declared_classes()), 'PhpOffice\\PhpWord\\Autoloader::autoload() failed to autoload the PhpOffice\\PhpWord\\Exceptions\\InvalidStyleException class');
} }
} }