#160 Refactor folders: Element, Container, and Exception
- Rename folder Section to Element - Rename folder Exceptions to Exception - Move Section, Header, Footer, Settings to Container folder - Move Element\Footer\PreserveText to Element\PreserveText
This commit is contained in:
parent
e405bf2b71
commit
13e5ca0a84
|
|
@ -24,6 +24,7 @@ This is the changelog between releases of PHPWord. Releases are listed in revers
|
|||
- Documentation: Simplify page level docblock - @ivanlanin GH-179
|
||||
- Writer: Refactor writer classes and make a new Writer abstract class - @ivanlanin GH-160
|
||||
- Reader: Rename AbstractReader > Reader - @ivanlanin
|
||||
- General: Refactor folders: Element, Container, and Exception - @ivanlanin
|
||||
|
||||
## 0.9.1 - 27 Mar 2014
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,17 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Container;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\InvalidImageException;
|
||||
use PhpOffice\PhpWord\Exception\InvalidImageException;
|
||||
use PhpOffice\PhpWord\Media;
|
||||
use PhpOffice\PhpWord\Section\Footer\PreserveText;
|
||||
use PhpOffice\PhpWord\Shared\String;
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
use PhpOffice\PhpWord\Element\PreserveText;
|
||||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\Table;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
|
||||
/**
|
||||
* Footer element
|
||||
|
|
@ -56,7 +61,7 @@ class Footer
|
|||
* @param string $text
|
||||
* @param mixed $styleFont
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\Text
|
||||
* @return \PhpOffice\PhpWord\Element\Text
|
||||
*/
|
||||
public function addText($text, $styleFont = null, $styleParagraph = null)
|
||||
{
|
||||
|
|
@ -86,7 +91,7 @@ class Footer
|
|||
* Create a new TextRun
|
||||
*
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\TextRun
|
||||
* @return \PhpOffice\PhpWord\Element\TextRun
|
||||
*/
|
||||
public function createTextRun($styleParagraph = null)
|
||||
{
|
||||
|
|
@ -99,7 +104,7 @@ class Footer
|
|||
* Add a Table Element
|
||||
*
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Table
|
||||
* @return \PhpOffice\PhpWord\Element\Table
|
||||
*/
|
||||
public function addTable($style = null)
|
||||
{
|
||||
|
|
@ -113,7 +118,7 @@ class Footer
|
|||
*
|
||||
* @param string $src
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Image
|
||||
* @return \PhpOffice\PhpWord\Element\Image
|
||||
*/
|
||||
public function addImage($src, $style = null)
|
||||
{
|
||||
|
|
@ -146,7 +151,7 @@ class Footer
|
|||
* @param string $text
|
||||
* @param mixed $styleFont
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\Footer\PreserveText
|
||||
* @return \PhpOffice\PhpWord\Element\PreserveText
|
||||
*/
|
||||
public function addPreserveText($text, $styleFont = null, $styleParagraph = null)
|
||||
{
|
||||
|
|
@ -7,12 +7,17 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Container;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\InvalidImageException;
|
||||
use PhpOffice\PhpWord\Exception\InvalidImageException;
|
||||
use PhpOffice\PhpWord\Media;
|
||||
use PhpOffice\PhpWord\Section\Footer\PreserveText;
|
||||
use PhpOffice\PhpWord\Shared\String;
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
use PhpOffice\PhpWord\Element\PreserveText;
|
||||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\Table;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
|
||||
/**
|
||||
* Header element
|
||||
|
|
@ -85,7 +90,7 @@ class Header
|
|||
* @param string $text
|
||||
* @param mixed $styleFont
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\Text
|
||||
* @return \PhpOffice\PhpWord\Element\Text
|
||||
*/
|
||||
public function addText($text, $styleFont = null, $styleParagraph = null)
|
||||
{
|
||||
|
|
@ -115,7 +120,7 @@ class Header
|
|||
* Create a new TextRun
|
||||
*
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\TextRun
|
||||
* @return \PhpOffice\PhpWord\Element\TextRun
|
||||
*/
|
||||
public function createTextRun($styleParagraph = null)
|
||||
{
|
||||
|
|
@ -128,7 +133,7 @@ class Header
|
|||
* Add a Table Element
|
||||
*
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Table
|
||||
* @return \PhpOffice\PhpWord\Element\Table
|
||||
*/
|
||||
public function addTable($style = null)
|
||||
{
|
||||
|
|
@ -142,7 +147,7 @@ class Header
|
|||
*
|
||||
* @param string $src
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Image
|
||||
* @return \PhpOffice\PhpWord\Element\Image
|
||||
*/
|
||||
public function addImage($src, $style = null)
|
||||
{
|
||||
|
|
@ -175,7 +180,7 @@ class Header
|
|||
* @param string $text
|
||||
* @param mixed $styleFont
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\Footer\PreserveText
|
||||
* @return \PhpOffice\PhpWord\Element\PreserveText
|
||||
*/
|
||||
public function addPreserveText($text, $styleFont = null, $styleParagraph = null)
|
||||
{
|
||||
|
|
@ -192,7 +197,7 @@ class Header
|
|||
*
|
||||
* @param string $src
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Image
|
||||
* @return \PhpOffice\PhpWord\Element\Image
|
||||
*/
|
||||
public function addWatermark($src, $style = null)
|
||||
{
|
||||
|
|
@ -7,22 +7,27 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord;
|
||||
namespace PhpOffice\PhpWord\Container;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\InvalidObjectException;
|
||||
use PhpOffice\PhpWord\Section\Footer;
|
||||
use PhpOffice\PhpWord\Section\Image;
|
||||
use PhpOffice\PhpWord\Section\Header;
|
||||
use PhpOffice\PhpWord\Section\Link;
|
||||
use PhpOffice\PhpWord\Section\ListItem;
|
||||
use PhpOffice\PhpWord\Section\Object;
|
||||
use PhpOffice\PhpWord\Section\PageBreak;
|
||||
use PhpOffice\PhpWord\Section\Table;
|
||||
use PhpOffice\PhpWord\Section\Text;
|
||||
use PhpOffice\PhpWord\Section\TextBreak;
|
||||
use PhpOffice\PhpWord\Section\TextRun;
|
||||
use PhpOffice\PhpWord\Section\Title;
|
||||
use PhpOffice\PhpWord\Section\CheckBox;
|
||||
use PhpOffice\PhpWord\Exception\InvalidImageException;
|
||||
use PhpOffice\PhpWord\Exception\InvalidObjectException;
|
||||
use PhpOffice\PhpWord\Footnote;
|
||||
use PhpOffice\PhpWord\Media;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\TOC;
|
||||
use PhpOffice\PhpWord\Container\Footer;
|
||||
use PhpOffice\PhpWord\Container\Header;
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
use PhpOffice\PhpWord\Element\Title;
|
||||
use PhpOffice\PhpWord\Element\Link;
|
||||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\PageBreak;
|
||||
use PhpOffice\PhpWord\Element\ListItem;
|
||||
use PhpOffice\PhpWord\Element\Table;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
use PhpOffice\PhpWord\Element\Object;
|
||||
use PhpOffice\PhpWord\Element\CheckBox;
|
||||
use PhpOffice\PhpWord\Shared\String;
|
||||
|
||||
/**
|
||||
|
|
@ -40,7 +45,7 @@ class Section
|
|||
/**
|
||||
* Section settings
|
||||
*
|
||||
* @var \PhpOffice\PhpWord\Section\Settings
|
||||
* @var \PhpOffice\PhpWord\Container\Settings
|
||||
*/
|
||||
private $_settings;
|
||||
|
||||
|
|
@ -61,7 +66,7 @@ class Section
|
|||
/**
|
||||
* Section Footer
|
||||
*
|
||||
* @var \PhpOffice\PhpWord\Section\Footer
|
||||
* @var \PhpOffice\PhpWord\Container\Footer
|
||||
*/
|
||||
private $_footer = null;
|
||||
|
||||
|
|
@ -75,7 +80,7 @@ class Section
|
|||
public function __construct($sectionCount, $settings = null)
|
||||
{
|
||||
$this->_sectionCount = $sectionCount;
|
||||
$this->_settings = new \PhpOffice\PhpWord\Section\Settings();
|
||||
$this->_settings = new \PhpOffice\PhpWord\Container\Settings();
|
||||
$this->setSettings($settings);
|
||||
}
|
||||
|
||||
|
|
@ -99,7 +104,7 @@ class Section
|
|||
/**
|
||||
* Get Section Settings
|
||||
*
|
||||
* @return \PhpOffice\PhpWord\Section\Settings
|
||||
* @return \PhpOffice\PhpWord\Container\Settings
|
||||
*/
|
||||
public function getSettings()
|
||||
{
|
||||
|
|
@ -112,7 +117,7 @@ class Section
|
|||
* @param string $text
|
||||
* @param mixed $styleFont
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\Text
|
||||
* @return \PhpOffice\PhpWord\Element\Text
|
||||
*/
|
||||
public function addText($text, $styleFont = null, $styleParagraph = null)
|
||||
{
|
||||
|
|
@ -131,7 +136,7 @@ class Section
|
|||
* @param string $linkName
|
||||
* @param mixed $styleFont
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\Link
|
||||
* @return \PhpOffice\PhpWord\Element\Link
|
||||
*/
|
||||
public function addLink($linkSrc, $linkName = null, $styleFont = null, $styleParagraph = null)
|
||||
{
|
||||
|
|
@ -178,7 +183,7 @@ class Section
|
|||
* Add a Table Element
|
||||
*
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Table
|
||||
* @return \PhpOffice\PhpWord\Element\Table
|
||||
*/
|
||||
public function addTable($style = null)
|
||||
{
|
||||
|
|
@ -195,7 +200,7 @@ class Section
|
|||
* @param mixed $styleFont
|
||||
* @param mixed $styleList
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\ListItem
|
||||
* @return \PhpOffice\PhpWord\Element\ListItem
|
||||
*/
|
||||
public function addListItem($text, $depth = 0, $styleFont = null, $styleList = null, $styleParagraph = null)
|
||||
{
|
||||
|
|
@ -210,11 +215,11 @@ class Section
|
|||
/**
|
||||
* Add a OLE-Object Element
|
||||
*
|
||||
* All exceptions should be handled by PhpOffice\PhpWord\Section\Object
|
||||
* All exceptions should be handled by PhpOffice\PhpWord\Element\Object
|
||||
*
|
||||
* @param string $src
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Object
|
||||
* @return \PhpOffice\PhpWord\Element\Object
|
||||
*/
|
||||
public function addObject($src, $style = null)
|
||||
{
|
||||
|
|
@ -225,7 +230,7 @@ class Section
|
|||
if (strlen($ext) == 4 && strtolower(substr($ext, -1)) == 'x') {
|
||||
$ext = substr($ext, 0, -1);
|
||||
}
|
||||
$icon = __DIR__ . "/_staticDocParts/_{$ext}.png";
|
||||
$icon = __DIR__ . "/../_staticDocParts/_{$ext}.png";
|
||||
$rIDimg = Media::addSectionMediaElement($icon, 'image', new Image($icon));
|
||||
$data = Media::addSectionMediaElement($src, 'oleObject');
|
||||
$rID = $data[0];
|
||||
|
|
@ -243,11 +248,11 @@ class Section
|
|||
/**
|
||||
* Add image element
|
||||
*
|
||||
* All exceptions should be handled by PhpOffice\PhpWord\Section\Image
|
||||
* All exceptions should be handled by PhpOffice\PhpWord\Element\Image
|
||||
*
|
||||
* @param string $src
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Image
|
||||
* @return \PhpOffice\PhpWord\Element\Image
|
||||
*/
|
||||
public function addImage($src, $style = null)
|
||||
{
|
||||
|
|
@ -290,7 +295,7 @@ class Section
|
|||
*
|
||||
* @param string $text
|
||||
* @param int $depth
|
||||
* @return \PhpOffice\PhpWord\Section\Title
|
||||
* @return \PhpOffice\PhpWord\Element\Title
|
||||
*/
|
||||
public function addTitle($text, $depth = 1)
|
||||
{
|
||||
|
|
@ -321,7 +326,7 @@ class Section
|
|||
* Create a new TextRun
|
||||
*
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\TextRun
|
||||
* @return \PhpOffice\PhpWord\Element\TextRun
|
||||
*/
|
||||
public function createTextRun($styleParagraph = null)
|
||||
{
|
||||
|
|
@ -343,7 +348,7 @@ class Section
|
|||
/**
|
||||
* Create a new Header
|
||||
*
|
||||
* @return \PhpOffice\PhpWord\Section\Header
|
||||
* @return \PhpOffice\PhpWord\Container\Header
|
||||
*/
|
||||
public function createHeader()
|
||||
{
|
||||
|
|
@ -381,7 +386,7 @@ class Section
|
|||
/**
|
||||
* Create a new Footer
|
||||
*
|
||||
* @return \PhpOffice\PhpWord\Section\Footer
|
||||
* @return \PhpOffice\PhpWord\Container\Footer
|
||||
*/
|
||||
public function createFooter()
|
||||
{
|
||||
|
|
@ -393,7 +398,7 @@ class Section
|
|||
/**
|
||||
* Get footer element
|
||||
*
|
||||
* @return \PhpOffice\PhpWord\Section\Footer
|
||||
* @return \PhpOffice\PhpWord\Container\Footer
|
||||
*/
|
||||
public function getFooter()
|
||||
{
|
||||
|
|
@ -404,11 +409,11 @@ class Section
|
|||
* Create a new Footnote Element
|
||||
*
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\Footnote
|
||||
* @return \PhpOffice\PhpWord\Element\Footnote
|
||||
*/
|
||||
public function createFootnote($styleParagraph = null)
|
||||
{
|
||||
$footnote = new \PhpOffice\PhpWord\Section\Footnote($styleParagraph);
|
||||
$footnote = new \PhpOffice\PhpWord\Element\Footnote($styleParagraph);
|
||||
$refID = Footnote::addFootnoteElement($footnote);
|
||||
$footnote->setReferenceId($refID);
|
||||
$this->_elementCollection[] = $footnote;
|
||||
|
|
@ -422,7 +427,7 @@ class Section
|
|||
* @param string $text
|
||||
* @param mixed $styleFont
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\CheckBox
|
||||
* @return \PhpOffice\PhpWord\Element\CheckBox
|
||||
*/
|
||||
public function addCheckBox($name, $text, $styleFont = null, $styleParagraph = null)
|
||||
{
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Container;
|
||||
|
||||
/**
|
||||
* Section settings
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ class Footnote
|
|||
*
|
||||
* @param string $text
|
||||
* @param mixed $styleFont
|
||||
* @return \PhpOffice\PhpWord\Section\Text
|
||||
* @return \PhpOffice\PhpWord\Element\Text
|
||||
*/
|
||||
public function addText($text = null, $styleFont = null)
|
||||
{
|
||||
|
|
@ -97,7 +97,7 @@ class Footnote
|
|||
* @param string $linkSrc
|
||||
* @param string $linkName
|
||||
* @param mixed $styleFont
|
||||
* @return \PhpOffice\PhpWord\Section\Link
|
||||
* @return \PhpOffice\PhpWord\Element\Link
|
||||
*/
|
||||
public function addLink($linkSrc, $linkName = null, $styleFont = null)
|
||||
{
|
||||
|
|
@ -7,10 +7,10 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\InvalidImageException;
|
||||
use PhpOffice\PhpWord\Exceptions\UnsupportedImageTypeException;
|
||||
use PhpOffice\PhpWord\Exception\InvalidImageException;
|
||||
use PhpOffice\PhpWord\Exception\UnsupportedImageTypeException;
|
||||
|
||||
/**
|
||||
* Image element
|
||||
|
|
@ -86,8 +86,8 @@ class Image
|
|||
* @param string $source
|
||||
* @param mixed $style
|
||||
* @param bool $isWatermark
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\InvalidImageException
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\UnsupportedImageTypeException
|
||||
* @throws \PhpOffice\PhpWord\Exception\InvalidImageException
|
||||
* @throws \PhpOffice\PhpWord\Exception\UnsupportedImageTypeException
|
||||
*/
|
||||
public function __construct($source, $style = null, $isWatermark = false)
|
||||
{
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
/**
|
||||
* List item element
|
||||
|
|
@ -24,7 +24,7 @@ class ListItem
|
|||
/**
|
||||
* Textrun
|
||||
*
|
||||
* @var \PhpOffice\PhpWord\Section\Text
|
||||
* @var \PhpOffice\PhpWord\Element\Text
|
||||
*/
|
||||
private $_textObject;
|
||||
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
/**
|
||||
* Object element
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
/**
|
||||
* Page break element
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section\Footer;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
|
|
@ -7,9 +7,9 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Table\Row;
|
||||
use PhpOffice\PhpWord\Element\Table\Row;
|
||||
|
||||
/**
|
||||
* Table element
|
||||
|
|
@ -98,7 +98,7 @@ class Table
|
|||
*
|
||||
* @param int $width
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Table\Cell
|
||||
* @return \PhpOffice\PhpWord\Element\Table\Cell
|
||||
*/
|
||||
public function addCell($width = null, $style = null)
|
||||
{
|
||||
|
|
@ -7,21 +7,21 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section\Table;
|
||||
namespace PhpOffice\PhpWord\Element\Table;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exceptions\InvalidObjectException;
|
||||
use PhpOffice\PhpWord\Exceptions\InvalidImageException;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Exception\InvalidObjectException;
|
||||
use PhpOffice\PhpWord\Exception\InvalidImageException;
|
||||
use PhpOffice\PhpWord\Media;
|
||||
use PhpOffice\PhpWord\Section\Footer\PreserveText;
|
||||
use PhpOffice\PhpWord\Section\Image;
|
||||
use PhpOffice\PhpWord\Section\Link;
|
||||
use PhpOffice\PhpWord\Section\ListItem;
|
||||
use PhpOffice\PhpWord\Section\Object;
|
||||
use PhpOffice\PhpWord\Section\Text;
|
||||
use PhpOffice\PhpWord\Section\TextBreak;
|
||||
use PhpOffice\PhpWord\Section\TextRun;
|
||||
use PhpOffice\PhpWord\Section\CheckBox;
|
||||
use PhpOffice\PhpWord\Element\PreserveText;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
use PhpOffice\PhpWord\Element\Link;
|
||||
use PhpOffice\PhpWord\Element\ListItem;
|
||||
use PhpOffice\PhpWord\Element\Object;
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
use PhpOffice\PhpWord\Element\CheckBox;
|
||||
use PhpOffice\PhpWord\Shared\String;
|
||||
|
||||
/**
|
||||
|
|
@ -100,7 +100,7 @@ class Cell
|
|||
* @param string $text
|
||||
* @param mixed $styleFont
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\Text
|
||||
* @return \PhpOffice\PhpWord\Element\Text
|
||||
*/
|
||||
public function addText($text, $styleFont = null, $styleParagraph = null)
|
||||
{
|
||||
|
|
@ -118,7 +118,7 @@ class Cell
|
|||
* @param string $linkSrc
|
||||
* @param string $linkName
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Link
|
||||
* @return \PhpOffice\PhpWord\Element\Link
|
||||
*/
|
||||
public function addLink($linkSrc, $linkName = null, $style = null)
|
||||
{
|
||||
|
|
@ -165,7 +165,7 @@ class Cell
|
|||
* @param int $depth
|
||||
* @param mixed $styleText
|
||||
* @param mixed $styleList
|
||||
* @return \PhpOffice\PhpWord\Section\ListItem
|
||||
* @return \PhpOffice\PhpWord\Element\ListItem
|
||||
*/
|
||||
public function addListItem($text, $depth = 0, $styleText = null, $styleList = null)
|
||||
{
|
||||
|
|
@ -182,7 +182,7 @@ class Cell
|
|||
*
|
||||
* @param string $src
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Image
|
||||
* @return \PhpOffice\PhpWord\Element\Image
|
||||
*/
|
||||
public function addImage($src, $style = null)
|
||||
{
|
||||
|
|
@ -220,7 +220,7 @@ class Cell
|
|||
*
|
||||
* @param string $src
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Object
|
||||
* @return \PhpOffice\PhpWord\Element\Object
|
||||
*/
|
||||
public function addObject($src, $style = null)
|
||||
{
|
||||
|
|
@ -262,7 +262,7 @@ class Cell
|
|||
* @param string $text
|
||||
* @param mixed $styleFont
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\Footer\PreserveText
|
||||
* @return \PhpOffice\PhpWord\Element\PreserveText
|
||||
*/
|
||||
public function addPreserveText($text, $styleFont = null, $styleParagraph = null)
|
||||
{
|
||||
|
|
@ -282,7 +282,7 @@ class Cell
|
|||
* Create a new TextRun
|
||||
*
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\TextRun
|
||||
* @return \PhpOffice\PhpWord\Element\TextRun
|
||||
*/
|
||||
public function createTextRun($styleParagraph = null)
|
||||
{
|
||||
|
|
@ -298,7 +298,7 @@ class Cell
|
|||
* @param string $text
|
||||
* @param mixed $styleFont
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\CheckBox
|
||||
* @return \PhpOffice\PhpWord\Element\CheckBox
|
||||
*/
|
||||
public function addCheckBox($name, $text, $styleFont = null, $styleParagraph = null)
|
||||
{
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section\Table;
|
||||
namespace PhpOffice\PhpWord\Element\Table;
|
||||
|
||||
/**
|
||||
* Table row element
|
||||
|
|
@ -83,7 +83,7 @@ class Row
|
|||
*
|
||||
* @param int $width
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Table\Cell
|
||||
* @return \PhpOffice\PhpWord\Element\Table\Cell
|
||||
*/
|
||||
public function addCell($width = null, $style = null)
|
||||
{
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
|
|
@ -7,9 +7,9 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\InvalidImageException;
|
||||
use PhpOffice\PhpWord\Exception\InvalidImageException;
|
||||
use PhpOffice\PhpWord\Media;
|
||||
use PhpOffice\PhpWord\Shared\String;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
|
|
@ -65,7 +65,7 @@ class TextRun
|
|||
*
|
||||
* @param string $text
|
||||
* @param mixed $styleFont
|
||||
* @return \PhpOffice\PhpWord\Section\Text
|
||||
* @return \PhpOffice\PhpWord\Element\Text
|
||||
*/
|
||||
public function addText($text = null, $styleFont = null)
|
||||
{
|
||||
|
|
@ -83,7 +83,7 @@ class TextRun
|
|||
* @param string $linkSrc
|
||||
* @param string $linkName
|
||||
* @param mixed $styleFont
|
||||
* @return \PhpOffice\PhpWord\Section\Link
|
||||
* @return \PhpOffice\PhpWord\Element\Link
|
||||
*/
|
||||
public function addLink($linkSrc, $linkName = null, $styleFont = null)
|
||||
{
|
||||
|
|
@ -105,7 +105,7 @@ class TextRun
|
|||
*
|
||||
* @param string $imageSrc
|
||||
* @param mixed $style
|
||||
* @return \PhpOffice\PhpWord\Section\Image
|
||||
* @return \PhpOffice\PhpWord\Element\Image
|
||||
*/
|
||||
public function addImage($imageSrc, $style = null)
|
||||
{
|
||||
|
|
@ -138,11 +138,11 @@ class TextRun
|
|||
* Create a new Footnote Element
|
||||
*
|
||||
* @param mixed $styleParagraph
|
||||
* @return \PhpOffice\PhpWord\Section\Footnote
|
||||
* @return \PhpOffice\PhpWord\Element\Footnote
|
||||
*/
|
||||
public function createFootnote($styleParagraph = null)
|
||||
{
|
||||
$footnote = new \PhpOffice\PhpWord\Section\Footnote($styleParagraph);
|
||||
$footnote = new \PhpOffice\PhpWord\Element\Footnote($styleParagraph);
|
||||
$refID = \PhpOffice\PhpWord\Footnote::addFootnoteElement($footnote);
|
||||
$footnote->setReferenceId($refID);
|
||||
$this->_elementCollection[] = $footnote;
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Section;
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
/**
|
||||
* Title element
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Exceptions;
|
||||
namespace PhpOffice\PhpWord\Exception;
|
||||
|
||||
/**
|
||||
* General exception
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Exceptions;
|
||||
namespace PhpOffice\PhpWord\Exception;
|
||||
|
||||
/**
|
||||
* Exception used for when an image is not found
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Exceptions;
|
||||
namespace PhpOffice\PhpWord\Exception;
|
||||
|
||||
/**
|
||||
* Exception used for when an image is not found
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Exceptions;
|
||||
namespace PhpOffice\PhpWord\Exception;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Exceptions;
|
||||
namespace PhpOffice\PhpWord\Exception;
|
||||
|
||||
/**
|
||||
* Exception used for when an image type is unsupported
|
||||
|
|
@ -33,7 +33,7 @@ class Footnote
|
|||
*
|
||||
* @return int Reference ID
|
||||
*/
|
||||
public static function addFootnoteElement(\PhpOffice\PhpWord\Section\Footnote $footnote)
|
||||
public static function addFootnoteElement(\PhpOffice\PhpWord\Element\Footnote $footnote)
|
||||
{
|
||||
$refID = self::countFootnoteElements() + 2;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
|
||||
/**
|
||||
* Hash table
|
||||
|
|
@ -48,7 +48,7 @@ class HashTable
|
|||
* Add HashTable items from source
|
||||
*
|
||||
* @param \PhpOffice\PhpWord\IComparable[] $pSource Source array to create HashTable from
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function addFromSource($pSource = null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
|
||||
/**
|
||||
* IO factory
|
||||
|
|
@ -22,7 +22,7 @@ abstract class IOFactory
|
|||
* @param \PhpOffice\PhpWord\PhpWord $phpWord
|
||||
* @param string $name
|
||||
* @return \PhpOffice\PhpWord\Writer\IWriter
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public static function createWriter(PhpWord $phpWord, $name)
|
||||
{
|
||||
|
|
@ -39,7 +39,7 @@ abstract class IOFactory
|
|||
*
|
||||
* @param string $name
|
||||
* @return \PhpOffice\PhpWord\Reader\IReader
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public static function createReader($name)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Image;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
|
||||
/**
|
||||
* Media
|
||||
|
|
@ -53,7 +53,7 @@ class Media
|
|||
*
|
||||
* @param string $src
|
||||
* @param string $type
|
||||
* @param \PhpOffice\PhpWord\Section\Image $image
|
||||
* @param \PhpOffice\PhpWord\Element\Image $image
|
||||
* @return mixed
|
||||
*/
|
||||
public static function addSectionMediaElement($src, $type, Image $image = null)
|
||||
|
|
@ -165,7 +165,7 @@ class Media
|
|||
*
|
||||
* @param int $headerCount
|
||||
* @param string $src
|
||||
* @param \PhpOffice\PhpWord\Section\Image $image
|
||||
* @param \PhpOffice\PhpWord\Element\Image $image
|
||||
* @return int
|
||||
*/
|
||||
public static function addHeaderMediaElement($headerCount, $src, Image $image = null)
|
||||
|
|
@ -228,7 +228,7 @@ class Media
|
|||
*
|
||||
* @param int $footerCount
|
||||
* @param string $src
|
||||
* @param \PhpOffice\PhpWord\Section\Image $image
|
||||
* @param \PhpOffice\PhpWord\Element\Image $image
|
||||
* @return int
|
||||
*/
|
||||
public static function addFooterMediaElement($footerCount, $src, Image $image = null)
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
namespace PhpOffice\PhpWord;
|
||||
|
||||
use PhpOffice\PhpWord\DocumentProperties;
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Section;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Container\Section;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\Template;
|
||||
|
||||
|
|
@ -94,8 +94,8 @@ class PhpWord
|
|||
/**
|
||||
* Create new section
|
||||
*
|
||||
* @param \PhpOffice\PhpWord\Section\Settings $settings
|
||||
* @return \PhpOffice\PhpWord\Section
|
||||
* @param \PhpOffice\PhpWord\Container\Settings $settings
|
||||
* @return \PhpOffice\PhpWord\Container\Section
|
||||
*/
|
||||
public function createSection($settings = null)
|
||||
{
|
||||
|
|
@ -216,7 +216,7 @@ class PhpWord
|
|||
/**
|
||||
* Get all sections
|
||||
*
|
||||
* @return \PhpOffice\PhpWord\Section[]
|
||||
* @return \PhpOffice\PhpWord\Container\Section[]
|
||||
*/
|
||||
public function getSections()
|
||||
{
|
||||
|
|
@ -228,7 +228,7 @@ class PhpWord
|
|||
*
|
||||
* @param string $filename Fully qualified filename.
|
||||
* @return \PhpOffice\PhpWord\Template
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function loadTemplate($filename)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Reader;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
|
||||
/**
|
||||
* Reader abstract class
|
||||
|
|
@ -60,7 +60,7 @@ abstract class Reader implements IReader
|
|||
*
|
||||
* @param string $pFilename
|
||||
* @return resource
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
protected function openFile($pFilename)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace PhpOffice\PhpWord\Reader;
|
|||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Settings;
|
||||
use PhpOffice\PhpWord\DocumentProperties;
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
|
||||
/**
|
||||
* Reader for Word2007
|
||||
|
|
@ -24,7 +24,7 @@ class Word2007 extends Reader implements IReader
|
|||
*
|
||||
* @param string $pFilename
|
||||
* @return bool
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function canRead($pFilename)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Shared;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
if (!defined('PCLZIP_TEMPORARY_DIR')) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Shared;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Settings;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
namespace PhpOffice\PhpWord\Style;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Exceptions\InvalidStyleException;
|
||||
use PhpOffice\PhpWord\Exception\InvalidStyleException;
|
||||
|
||||
/**
|
||||
* Font style
|
||||
|
|
@ -513,7 +513,7 @@ class Font
|
|||
*
|
||||
* @param int|float|string $lineHeight
|
||||
* @return $this
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\InvalidStyleException
|
||||
* @throws \PhpOffice\PhpWord\Exception\InvalidStyleException
|
||||
*/
|
||||
public function setLineHeight($lineHeight)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Style;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\InvalidStyleException;
|
||||
use PhpOffice\PhpWord\Exception\InvalidStyleException;
|
||||
|
||||
/**
|
||||
* Paragraph style
|
||||
|
|
@ -468,7 +468,7 @@ class Paragraph
|
|||
*
|
||||
* @param int|float|string $lineHeight
|
||||
* @return $this
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\InvalidStyleException
|
||||
* @throws \PhpOffice\PhpWord\Exception\InvalidStyleException
|
||||
*/
|
||||
public function setLineHeight($lineHeight)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Settings;
|
||||
use PhpOffice\PhpWord\Shared\String;
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ class Template
|
|||
* Create a new Template Object
|
||||
*
|
||||
* @param string $strFilename
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function __construct($strFilename)
|
||||
{
|
||||
|
|
@ -71,7 +71,7 @@ class Template
|
|||
* @param \DOMDocument $xslDOMDocument
|
||||
* @param array $xslOptions
|
||||
* @param string $xslOptionsURI
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function applyXslStyleSheet(&$xslDOMDocument, $xslOptions = array(), $xslOptionsURI = '')
|
||||
{
|
||||
|
|
@ -147,7 +147,7 @@ class Template
|
|||
*
|
||||
* @param int $offset
|
||||
* @return int
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
private function _findRowStart($offset)
|
||||
{
|
||||
|
|
@ -193,7 +193,7 @@ class Template
|
|||
*
|
||||
* @param string $search
|
||||
* @param int $numberOfClones
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function cloneRow($search, $numberOfClones)
|
||||
{
|
||||
|
|
@ -247,7 +247,7 @@ class Template
|
|||
* Save XML to temporary file
|
||||
*
|
||||
* @return string
|
||||
* @throws \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\HashTable;
|
||||
use PhpOffice\PhpWord\Settings;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,17 @@
|
|||
namespace PhpOffice\PhpWord\Writer\ODText;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Section;
|
||||
use PhpOffice\PhpWord\Section\Image;
|
||||
use PhpOffice\PhpWord\Section\Link;
|
||||
use PhpOffice\PhpWord\Section\ListItem;
|
||||
use PhpOffice\PhpWord\Section\Object;
|
||||
use PhpOffice\PhpWord\Section\PageBreak;
|
||||
use PhpOffice\PhpWord\Section\Table;
|
||||
use PhpOffice\PhpWord\Section\Text;
|
||||
use PhpOffice\PhpWord\Section\TextBreak;
|
||||
use PhpOffice\PhpWord\Section\TextRun;
|
||||
use PhpOffice\PhpWord\Section\Title;
|
||||
use PhpOffice\PhpWord\Container\Section;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
use PhpOffice\PhpWord\Element\Link;
|
||||
use PhpOffice\PhpWord\Element\ListItem;
|
||||
use PhpOffice\PhpWord\Element\Object;
|
||||
use PhpOffice\PhpWord\Element\PageBreak;
|
||||
use PhpOffice\PhpWord\Element\Table;
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
use PhpOffice\PhpWord\Element\Title;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\ODText;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,19 +9,19 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\HashTable;
|
||||
use PhpOffice\PhpWord\Section\Image;
|
||||
use PhpOffice\PhpWord\Section\Link;
|
||||
use PhpOffice\PhpWord\Section\ListItem;
|
||||
use PhpOffice\PhpWord\Section\Object;
|
||||
use PhpOffice\PhpWord\Section\PageBreak;
|
||||
use PhpOffice\PhpWord\Section\Table;
|
||||
use PhpOffice\PhpWord\Section\Text;
|
||||
use PhpOffice\PhpWord\Section\TextBreak;
|
||||
use PhpOffice\PhpWord\Section\TextRun;
|
||||
use PhpOffice\PhpWord\Section\Title;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
use PhpOffice\PhpWord\Element\Link;
|
||||
use PhpOffice\PhpWord\Element\ListItem;
|
||||
use PhpOffice\PhpWord\Element\Object;
|
||||
use PhpOffice\PhpWord\Element\PageBreak;
|
||||
use PhpOffice\PhpWord\Element\Table;
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
use PhpOffice\PhpWord\Element\Title;
|
||||
use PhpOffice\PhpWord\Shared\Drawing;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Footnote;
|
||||
use PhpOffice\PhpWord\Media;
|
||||
|
|
|
|||
|
|
@ -10,18 +10,18 @@
|
|||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Section\Text;
|
||||
use PhpOffice\PhpWord\Section\TextRun;
|
||||
use PhpOffice\PhpWord\Section\Link;
|
||||
use PhpOffice\PhpWord\Section\Title;
|
||||
use PhpOffice\PhpWord\Section\Footer\PreserveText;
|
||||
use PhpOffice\PhpWord\Section\TextBreak;
|
||||
use PhpOffice\PhpWord\Section\ListItem;
|
||||
use PhpOffice\PhpWord\Section\Table;
|
||||
use PhpOffice\PhpWord\Section\Image;
|
||||
use PhpOffice\PhpWord\Section\Object;
|
||||
use PhpOffice\PhpWord\Section\Footnote;
|
||||
use PhpOffice\PhpWord\Section\CheckBox;
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
use PhpOffice\PhpWord\Element\Link;
|
||||
use PhpOffice\PhpWord\Element\Title;
|
||||
use PhpOffice\PhpWord\Element\PreserveText;
|
||||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\ListItem;
|
||||
use PhpOffice\PhpWord\Element\Table;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
use PhpOffice\PhpWord\Element\Object;
|
||||
use PhpOffice\PhpWord\Element\Footnote;
|
||||
use PhpOffice\PhpWord\Element\CheckBox;
|
||||
use PhpOffice\PhpWord\Shared\String;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -10,19 +10,19 @@
|
|||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Section;
|
||||
use PhpOffice\PhpWord\Section\Footnote;
|
||||
use PhpOffice\PhpWord\Section\Image;
|
||||
use PhpOffice\PhpWord\Section\Link;
|
||||
use PhpOffice\PhpWord\Section\ListItem;
|
||||
use PhpOffice\PhpWord\Section\Object;
|
||||
use PhpOffice\PhpWord\Section\PageBreak;
|
||||
use PhpOffice\PhpWord\Section\Table;
|
||||
use PhpOffice\PhpWord\Section\Text;
|
||||
use PhpOffice\PhpWord\Section\TextBreak;
|
||||
use PhpOffice\PhpWord\Section\TextRun;
|
||||
use PhpOffice\PhpWord\Section\Title;
|
||||
use PhpOffice\PhpWord\Section\CheckBox;
|
||||
use PhpOffice\PhpWord\Container\Section;
|
||||
use PhpOffice\PhpWord\Element\Footnote;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
use PhpOffice\PhpWord\Element\Link;
|
||||
use PhpOffice\PhpWord\Element\ListItem;
|
||||
use PhpOffice\PhpWord\Element\Object;
|
||||
use PhpOffice\PhpWord\Element\PageBreak;
|
||||
use PhpOffice\PhpWord\Element\Table;
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
use PhpOffice\PhpWord\Element\Title;
|
||||
use PhpOffice\PhpWord\Element\CheckBox;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Footer\PreserveText;
|
||||
use PhpOffice\PhpWord\Section\Image;
|
||||
use PhpOffice\PhpWord\Section\Table;
|
||||
use PhpOffice\PhpWord\Section\Text;
|
||||
use PhpOffice\PhpWord\Section\TextBreak;
|
||||
use PhpOffice\PhpWord\Section\TextRun;
|
||||
use PhpOffice\PhpWord\Section\Footer as FooterElement;
|
||||
use PhpOffice\PhpWord\Element\PreserveText;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
use PhpOffice\PhpWord\Element\Table;
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
use PhpOffice\PhpWord\Container\Footer as FooterElement;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Footnote;
|
||||
use PhpOffice\PhpWord\Section\Text;
|
||||
use PhpOffice\PhpWord\Section\Link;
|
||||
use PhpOffice\PhpWord\Section\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\Footnote;
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Element\Link;
|
||||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Footer\PreserveText;
|
||||
use PhpOffice\PhpWord\Section\Image;
|
||||
use PhpOffice\PhpWord\Section\Table;
|
||||
use PhpOffice\PhpWord\Section\Text;
|
||||
use PhpOffice\PhpWord\Section\TextBreak;
|
||||
use PhpOffice\PhpWord\Section\TextRun;
|
||||
use PhpOffice\PhpWord\Section\Header as HeaderElement;
|
||||
use PhpOffice\PhpWord\Element\PreserveText;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
use PhpOffice\PhpWord\Element\Table;
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
use PhpOffice\PhpWord\Container\Header as HeaderElement;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Writer\IWriter;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -45,11 +45,11 @@ class AutoloaderTest extends \PHPUnit_Framework_TestCase
|
|||
'classes outside of the PhpOffice\\PhpWord namespace'
|
||||
);
|
||||
// TODO change this class to the main PhpWord class when it is namespaced
|
||||
Autoloader::autoload('PhpOffice\\PhpWord\\Exceptions\\InvalidStyleException');
|
||||
Autoloader::autoload('PhpOffice\\PhpWord\\Exception\\InvalidStyleException');
|
||||
$this->assertTrue(
|
||||
\in_array('PhpOffice\\PhpWord\\Exceptions\\InvalidStyleException', \get_declared_classes()),
|
||||
\in_array('PhpOffice\\PhpWord\\Exception\\InvalidStyleException', \get_declared_classes()),
|
||||
'PhpOffice\\PhpWord\\Autoloader::autoload() failed to autoload the ' .
|
||||
'PhpOffice\\PhpWord\\Exceptions\\InvalidStyleException class'
|
||||
'PhpOffice\\PhpWord\\Exception\\InvalidStyleException class'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Container;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Footer;
|
||||
use PhpOffice\PhpWord\Container\Footer;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Footer
|
||||
* Test class for PhpOffice\PhpWord\Container\Footer
|
||||
*
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
|
|
@ -26,7 +26,7 @@ class FooterTest extends \PHPUnit_Framework_TestCase
|
|||
$iVal = rand(1, 1000);
|
||||
$oFooter = new Footer($iVal);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Footer', $oFooter);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Container\\Footer', $oFooter);
|
||||
$this->assertEquals($oFooter->getFooterCount(), $iVal);
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ class FooterTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oFooter->addText('text');
|
||||
|
||||
$this->assertCount(1, $oFooter->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Text', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -51,7 +51,7 @@ class FooterTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oFooter->addText(utf8_decode('ééé'));
|
||||
|
||||
$this->assertCount(1, $oFooter->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Text', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element);
|
||||
$this->assertEquals($element->getText(), 'ééé');
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ class FooterTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oFooter->createTextRun();
|
||||
|
||||
$this->assertCount(1, $oFooter->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\TextRun', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\TextRun', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -88,7 +88,7 @@ class FooterTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oFooter->addTable();
|
||||
|
||||
$this->assertCount(1, $oFooter->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Table', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Table', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -102,7 +102,7 @@ class FooterTest extends \PHPUnit_Framework_TestCase
|
|||
$element2 = $oFooter->addMemoryImage($src); // @deprecated
|
||||
|
||||
$this->assertCount(2, $oFooter->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $element1);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -116,7 +116,7 @@ class FooterTest extends \PHPUnit_Framework_TestCase
|
|||
);
|
||||
|
||||
$this->assertCount(1, $oFooter->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -128,7 +128,7 @@ class FooterTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oFooter->addPreserveText('text');
|
||||
|
||||
$this->assertCount(1, $oFooter->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Footer\\PreserveText', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -140,7 +140,7 @@ class FooterTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oFooter->addPreserveText(utf8_decode('ééé'));
|
||||
|
||||
$this->assertCount(1, $oFooter->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Footer\\PreserveText', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element);
|
||||
$this->assertEquals($element->getText(), array('ééé'));
|
||||
}
|
||||
|
||||
|
|
@ -7,12 +7,12 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Container;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Header;
|
||||
use PhpOffice\PhpWord\Container\Header;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Header
|
||||
* Test class for PhpOffice\PhpWord\Container\Header
|
||||
*
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
|
|
@ -26,7 +26,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase
|
|||
$iVal = rand(1, 1000);
|
||||
$oHeader = new Header($iVal);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Header', $oHeader);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Container\\Header', $oHeader);
|
||||
$this->assertEquals($oHeader->getHeaderCount(), $iVal);
|
||||
$this->assertEquals($oHeader->getType(), Header::AUTO);
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase
|
|||
$oHeader = new Header(1);
|
||||
$element = $oHeader->addText('text');
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Text', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element);
|
||||
$this->assertCount(1, $oHeader->getElements());
|
||||
$this->assertEquals($element->getText(), 'text');
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase
|
|||
$oHeader = new Header(1);
|
||||
$element = $oHeader->addText(utf8_decode('ééé'));
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Text', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element);
|
||||
$this->assertCount(1, $oHeader->getElements());
|
||||
$this->assertEquals($element->getText(), 'ééé');
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oHeader = new Header(1);
|
||||
$element = $oHeader->createTextRun();
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\TextRun', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\TextRun', $element);
|
||||
$this->assertCount(1, $oHeader->getElements());
|
||||
}
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oHeader = new Header(1);
|
||||
$element = $oHeader->addTable();
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Table', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Table', $element);
|
||||
$this->assertCount(1, $oHeader->getElements());
|
||||
}
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase
|
|||
$element2 = $oHeader->addMemoryImage($src); // @deprecated
|
||||
|
||||
$this->assertCount(2, $oHeader->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $element1);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -125,7 +125,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase
|
|||
);
|
||||
|
||||
$this->assertCount(1, $oHeader->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -137,7 +137,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oHeader->addPreserveText('text');
|
||||
|
||||
$this->assertCount(1, $oHeader->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Footer\\PreserveText', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -149,7 +149,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oHeader->addPreserveText(utf8_decode('ééé'));
|
||||
|
||||
$this->assertCount(1, $oHeader->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Footer\\PreserveText', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element);
|
||||
$this->assertEquals($element->getText(), array('ééé'));
|
||||
}
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oHeader->addWatermark($src);
|
||||
|
||||
$this->assertCount(1, $oHeader->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -7,13 +7,13 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests;
|
||||
namespace PhpOffice\PhpWord\Tests\Container;
|
||||
|
||||
use PhpOffice\PhpWord\Section;
|
||||
use PhpOffice\PhpWord\Container\Section;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section
|
||||
* Test class for PhpOffice\PhpWord\Container\Section
|
||||
*
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
|
|
@ -71,8 +71,8 @@ class SectionTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testAddElements()
|
||||
{
|
||||
$objectSource = __DIR__ . "/_files/documents/reader.docx";
|
||||
$imageSource = __DIR__ . "/_files/images/PhpWord.png";
|
||||
$objectSource = __DIR__ . "/../_files/documents/reader.docx";
|
||||
$imageSource = __DIR__ . "/../_files/images/PhpWord.png";
|
||||
$imageUrl = 'http://php.net//images/logos/php-med-trans-light.gif';
|
||||
|
||||
$section = new Section(0);
|
||||
|
|
@ -97,7 +97,7 @@ class SectionTest extends \PHPUnit_Framework_TestCase
|
|||
'Title', 'TextRun', 'Footnote', 'CheckBox');
|
||||
$i = 0;
|
||||
foreach ($elementTypes as $elementType) {
|
||||
$this->assertInstanceOf("PhpOffice\\PhpWord\\Section\\{$elementType}", $elementCollection[$i]);
|
||||
$this->assertInstanceOf("PhpOffice\\PhpWord\\Element\\{$elementType}", $elementCollection[$i]);
|
||||
$i++;
|
||||
}
|
||||
$this->assertInstanceOf("PhpOffice\\PhpWord\\TOC", $elementCollection[$i]);
|
||||
|
|
@ -106,7 +106,7 @@ class SectionTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Test add object exception
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\InvalidObjectException
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\InvalidObjectException
|
||||
*/
|
||||
public function testAddObjectException()
|
||||
{
|
||||
|
|
@ -125,7 +125,7 @@ class SectionTest extends \PHPUnit_Framework_TestCase
|
|||
$section->addTitle('Test', 1);
|
||||
$elementCollection = $section->getElements();
|
||||
|
||||
$this->assertInstanceOf("PhpOffice\\PhpWord\\Section\\Title", $elementCollection[0]);
|
||||
$this->assertInstanceOf("PhpOffice\\PhpWord\\Element\\Title", $elementCollection[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -138,7 +138,7 @@ class SectionTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
foreach ($elements as $element) {
|
||||
$method = "create{$element}";
|
||||
$this->assertInstanceOf("PhpOffice\\PhpWord\\Section\\{$element}", $object->$method());
|
||||
$this->assertInstanceOf("PhpOffice\\PhpWord\\Container\\{$element}", $object->$method());
|
||||
}
|
||||
$this->assertFalse($object->hasDifferentFirstPage());
|
||||
}
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Container;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Settings;
|
||||
use PhpOffice\PhpWord\Container\Settings;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Settings
|
||||
* Test class for PhpOffice\PhpWord\Container\Settings
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Section\Settings
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Container\Settings
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class SettingsTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -255,10 +255,10 @@ class SettingsTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertEquals(720, $oSettings->getColsSpace());
|
||||
|
||||
$iVal = rand(1, 1000);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Settings', $oSettings->setColsSpace($iVal));
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Container\\Settings', $oSettings->setColsSpace($iVal));
|
||||
$this->assertEquals($iVal, $oSettings->getColsSpace());
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Settings', $oSettings->setColsSpace());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Container\\Settings', $oSettings->setColsSpace());
|
||||
$this->assertEquals(720, $oSettings->getColsSpace());
|
||||
}
|
||||
|
||||
|
|
@ -7,13 +7,13 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\CheckBox;
|
||||
use PhpOffice\PhpWord\Element\CheckBox;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\CheckBox
|
||||
* Test class for PhpOffice\PhpWord\Element\CheckBox
|
||||
*
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
|
|
@ -26,7 +26,7 @@ class CheckBoxTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oCheckBox = new CheckBox();
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\CheckBox', $oCheckBox);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\CheckBox', $oCheckBox);
|
||||
$this->assertEquals(null, $oCheckBox->getText());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oCheckBox->getFontStyle());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oCheckBox->getParagraphStyle());
|
||||
|
|
@ -7,12 +7,12 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Footnote;
|
||||
use PhpOffice\PhpWord\Element\Footnote;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Footnote
|
||||
* Test class for PhpOffice\PhpWord\Element\Footnote
|
||||
*
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
|
|
@ -25,7 +25,7 @@ class FootnoteTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oFootnote = new Footnote();
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Footnote', $oFootnote);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Footnote', $oFootnote);
|
||||
$this->assertCount(0, $oFootnote->getElements());
|
||||
$this->assertEquals($oFootnote->getParagraphStyle(), null);
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ class FootnoteTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oFootnote->addText('text');
|
||||
|
||||
$this->assertCount(1, $oFootnote->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Text', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -85,7 +85,7 @@ class FootnoteTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oFootnote->addLink('http://www.google.fr');
|
||||
|
||||
$this->assertCount(1, $oFootnote->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Link', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -7,12 +7,12 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Image;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Image
|
||||
* Test class for PhpOffice\PhpWord\Element\Image
|
||||
*
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
|
|
@ -26,7 +26,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
|
|||
$src = __DIR__ . "/../_files/images/firefox.png";
|
||||
$oImage = new Image($src);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $oImage);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $oImage);
|
||||
$this->assertEquals($oImage->getSource(), $src);
|
||||
$this->assertEquals($oImage->getMediaId(), md5($src));
|
||||
$this->assertEquals($oImage->getIsWatermark(), false);
|
||||
|
|
@ -64,7 +64,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Image not found
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\InvalidImageException
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\InvalidImageException
|
||||
*/
|
||||
public function testImageNotFound()
|
||||
{
|
||||
|
|
@ -74,7 +74,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Invalid image types
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\UnsupportedImageTypeException
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\UnsupportedImageTypeException
|
||||
*/
|
||||
public function testInvalidImageTypes()
|
||||
{
|
||||
|
|
@ -123,7 +123,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
|
|||
$src = __DIR__ . "/../_files/images/firefox.png";
|
||||
$oImage = new Image($src);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $oImage);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $oImage);
|
||||
$this->assertEquals($oImage->getSource(), $src);
|
||||
$this->assertEquals($oImage->getMediaId(), md5($src));
|
||||
$this->assertEquals($oImage->getImageCreateFunction(), 'imagecreatefrompng');
|
||||
|
|
@ -140,7 +140,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
|
|||
$src = __DIR__ . "/../_files/images/mario.gif";
|
||||
$oImage = new Image($src);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $oImage);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $oImage);
|
||||
$this->assertEquals($oImage->getSource(), $src);
|
||||
$this->assertEquals($oImage->getMediaId(), md5($src));
|
||||
$this->assertEquals($oImage->getImageCreateFunction(), 'imagecreatefromgif');
|
||||
|
|
@ -157,7 +157,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
|
|||
$src = __DIR__ . "/../_files/images/earth.jpg";
|
||||
$oImage = new Image($src);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $oImage);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $oImage);
|
||||
$this->assertEquals($oImage->getSource(), $src);
|
||||
$this->assertEquals($oImage->getMediaId(), md5($src));
|
||||
$this->assertEquals($oImage->getImageCreateFunction(), 'imagecreatefromjpeg');
|
||||
|
|
@ -173,7 +173,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oImage = new Image(__DIR__ . "/../_files/images/duke_nukem.bmp");
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $oImage);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $oImage);
|
||||
$this->assertEquals($oImage->getImageCreateFunction(), null);
|
||||
$this->assertEquals($oImage->getImageFunction(), null);
|
||||
$this->assertEquals($oImage->getImageExtension(), 'bmp');
|
||||
|
|
@ -187,7 +187,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oImage = new Image(__DIR__ . "/../_files/images/angela_merkel.tif");
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $oImage);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $oImage);
|
||||
$this->assertEquals($oImage->getImageCreateFunction(), null);
|
||||
$this->assertEquals($oImage->getImageFunction(), null);
|
||||
$this->assertEquals($oImage->getImageType(), 'image/tiff');
|
||||
|
|
@ -7,15 +7,15 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Link;
|
||||
use PhpOffice\PhpWord\Element\Link;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Link
|
||||
* Test class for PhpOffice\PhpWord\Element\Link
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Section\Link
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Element\Link
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class LinkTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -27,7 +27,7 @@ class LinkTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oLink = new Link('http://www.google.com');
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Link', $oLink);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $oLink);
|
||||
$this->assertEquals($oLink->getLinkSrc(), 'http://www.google.com');
|
||||
$this->assertEquals($oLink->getLinkName(), null);
|
||||
$this->assertEquals($oLink->getFontStyle(), null);
|
||||
|
|
@ -46,7 +46,7 @@ class LinkTest extends \PHPUnit_Framework_TestCase
|
|||
array('marginLeft' => 600, 'marginRight' => 600, 'marginTop' => 600, 'marginBottom' => 600)
|
||||
);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Link', $oLink);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $oLink);
|
||||
$this->assertEquals($oLink->getLinkSrc(), 'http://www.google.com');
|
||||
$this->assertEquals($oLink->getLinkName(), 'Search Engine');
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oLink->getFontStyle());
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\ListItem;
|
||||
use PhpOffice\PhpWord\Element\ListItem;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\ListItem
|
||||
* Test class for PhpOffice\PhpWord\Element\ListItem
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Section\ListItem
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Element\ListItem
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class ListItemTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -26,7 +26,7 @@ class ListItemTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oListItem = new ListItem('text');
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Text', $oListItem->getTextObject());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $oListItem->getTextObject());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Object;
|
||||
use PhpOffice\PhpWord\Element\Object;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Object
|
||||
* Test class for PhpOffice\PhpWord\Element\Object
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Section\Object
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Element\Object
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class ObjectTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -27,7 +27,7 @@ class ObjectTest extends \PHPUnit_Framework_TestCase
|
|||
$src = __DIR__ . "/../_files/documents/sheet.xls";
|
||||
$oObject = new Object($src);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Object', $oObject);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Object', $oObject);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Image', $oObject->getStyle());
|
||||
$this->assertEquals($oObject->getSource(), $src);
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ class ObjectTest extends \PHPUnit_Framework_TestCase
|
|||
$src = __DIR__ . "/../_files/xsl/passthrough.xsl";
|
||||
$oObject = new Object($src);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Object', $oObject);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Object', $oObject);
|
||||
$this->assertEquals($oObject->getSource(), null);
|
||||
$this->assertEquals($oObject->getStyle(), null);
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ class ObjectTest extends \PHPUnit_Framework_TestCase
|
|||
$src = __DIR__ . "/../_files/documents/sheet.xls";
|
||||
$oObject = new Object($src, array('width' => '230px'));
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Object', $oObject);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Object', $oObject);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Image', $oObject->getStyle());
|
||||
$this->assertEquals($oObject->getSource(), $src);
|
||||
}
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\PageBreak;
|
||||
use PhpOffice\PhpWord\Element\PageBreak;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\PageBreak
|
||||
* Test class for PhpOffice\PhpWord\Element\PageBreak
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Section\PageBreak
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Element\PageBreak
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class PageBreakTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -27,6 +27,6 @@ class PageBreakTest extends \PHPUnit_Framework_TestCase
|
|||
// Section Settings
|
||||
$oPageBreak = new PageBreak();
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\PageBreak', $oPageBreak);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PageBreak', $oPageBreak);
|
||||
}
|
||||
}
|
||||
|
|
@ -7,12 +7,12 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section\Footer;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Footer\PreserveText;
|
||||
use PhpOffice\PhpWord\Element\PreserveText;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Footer\PreserveText
|
||||
* Test class for PhpOffice\PhpWord\Element\PreserveText
|
||||
*
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
|
|
@ -25,7 +25,7 @@ class PreserveTextTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oPreserveText = new PreserveText();
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Footer\\PreserveText', $oPreserveText);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $oPreserveText);
|
||||
$this->assertEquals($oPreserveText->getText(), null);
|
||||
$this->assertEquals($oPreserveText->getFontStyle(), null);
|
||||
$this->assertEquals($oPreserveText->getParagraphStyle(), null);
|
||||
|
|
@ -7,12 +7,12 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section\Table;
|
||||
namespace PhpOffice\PhpWord\Tests\Element\Table;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Table\Cell;
|
||||
use PhpOffice\PhpWord\Element\Table\Cell;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Table\Cell
|
||||
* Test class for PhpOffice\PhpWord\Element\Table\Cell
|
||||
*
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
|
|
@ -26,7 +26,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$iVal = rand(1, 1000);
|
||||
$oCell = new Cell('section', $iVal);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Table\\Cell', $oCell);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Table\\Cell', $oCell);
|
||||
$this->assertEquals($oCell->getWidth(), null);
|
||||
}
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oCell->addText('text');
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Text', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -74,7 +74,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oCell->addText(utf8_decode('ééé'));
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Text', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element);
|
||||
$this->assertEquals($element->getText(), 'ééé');
|
||||
}
|
||||
|
||||
|
|
@ -87,12 +87,12 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oCell->addLink(utf8_decode('ééé'), utf8_decode('ééé'));
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Link', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add link exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function testAddLinkException()
|
||||
{
|
||||
|
|
@ -120,7 +120,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oCell->addListItem('text');
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\ListItem', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\ListItem', $element);
|
||||
$this->assertEquals($element->getTextObject()->getText(), 'text');
|
||||
}
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oCell->addListItem(utf8_decode('ééé'));
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\ListItem', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\ListItem', $element);
|
||||
$this->assertEquals($element->getTextObject()->getText(), 'ééé');
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element2 = $oCell->addMemoryImage($src); // @deprecated
|
||||
|
||||
$this->assertCount(2, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $element1);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -161,7 +161,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oCell->addImage($src);
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -174,7 +174,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oCell->addImage($src);
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -188,7 +188,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
);
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -202,7 +202,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
);
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -216,7 +216,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
);
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -229,13 +229,13 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oCell->addObject($src);
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Object', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Object', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test add object exception
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\InvalidObjectException
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\InvalidObjectException
|
||||
*/
|
||||
public function testAddObjectException()
|
||||
{
|
||||
|
|
@ -253,7 +253,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oCell->addPreserveText('text');
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Footer\\PreserveText', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -265,14 +265,14 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oCell->addPreserveText(utf8_decode('ééé'));
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Footer\\PreserveText', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element);
|
||||
$this->assertEquals($element->getText(), array('ééé'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add preserve text exception
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function testAddPreserveTextException()
|
||||
{
|
||||
|
|
@ -289,7 +289,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oCell->createTextRun();
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\TextRun', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\TextRun', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -301,7 +301,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
|
|||
$element = $oCell->addCheckBox(utf8_decode('ééé'), utf8_decode('ééé'));
|
||||
|
||||
$this->assertCount(1, $oCell->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\CheckBox', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\CheckBox', $element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section\Table;
|
||||
namespace PhpOffice\PhpWord\Tests\Element\Table;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Table\Row;
|
||||
use PhpOffice\PhpWord\Element\Table\Row;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Table\Row
|
||||
* Test class for PhpOffice\PhpWord\Element\Table\Row
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Section\Table\Row
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Element\Table\Row
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class RowTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -27,7 +27,7 @@ class RowTest extends \PHPUnit_Framework_TestCase
|
|||
$iVal = rand(1, 1000);
|
||||
$oRow = new Row('section', $iVal);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Table\\Row', $oRow);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Table\\Row', $oRow);
|
||||
$this->assertEquals($oRow->getHeight(), null);
|
||||
$this->assertInternalType('array', $oRow->getCells());
|
||||
$this->assertCount(0, $oRow->getCells());
|
||||
|
|
@ -60,7 +60,7 @@ class RowTest extends \PHPUnit_Framework_TestCase
|
|||
$oRow = new Row('section', 1);
|
||||
$element = $oRow->addCell();
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Table\\Cell', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Table\\Cell', $element);
|
||||
$this->assertCount(1, $oRow->getCells());
|
||||
}
|
||||
}
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Table;
|
||||
use PhpOffice\PhpWord\Element\Table;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Table
|
||||
* Test class for PhpOffice\PhpWord\Element\Table
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Section\Table
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Element\Table
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class TableTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -26,7 +26,7 @@ class TableTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oTable = new Table('section', 1);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Table', $oTable);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Table', $oTable);
|
||||
$this->assertEquals($oTable->getStyle(), null);
|
||||
$this->assertEquals($oTable->getWidth(), null);
|
||||
$this->assertEquals($oTable->getRows(), array());
|
||||
|
|
@ -75,7 +75,7 @@ class TableTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oTable = new Table('section', 1);
|
||||
$element = $oTable->addRow();
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Table\\Row', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Table\\Row', $element);
|
||||
$this->assertCount(1, $oTable->getRows());
|
||||
}
|
||||
|
||||
|
|
@ -87,6 +87,6 @@ class TableTest extends \PHPUnit_Framework_TestCase
|
|||
$oTable = new Table('section', 1);
|
||||
$oTable->addRow();
|
||||
$element = $oTable->addCell();
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Table\\Cell', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Table\\Cell', $element);
|
||||
}
|
||||
}
|
||||
|
|
@ -7,16 +7,16 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\TextBreak
|
||||
* Test class for PhpOffice\PhpWord\Element\TextBreak
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Section\TextBreak
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Element\TextBreak
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class TextBreakTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -7,12 +7,12 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\TextRun;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\TextRun
|
||||
* Test class for PhpOffice\PhpWord\Element\TextRun
|
||||
*
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
|
|
@ -25,7 +25,7 @@ class TextRunTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oTextRun = new TextRun();
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\TextRun', $oTextRun);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\TextRun', $oTextRun);
|
||||
$this->assertCount(0, $oTextRun->getElements());
|
||||
$this->assertEquals($oTextRun->getParagraphStyle(), null);
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ class TextRunTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oTextRun = new TextRun('pStyle');
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\TextRun', $oTextRun);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\TextRun', $oTextRun);
|
||||
$this->assertCount(0, $oTextRun->getElements());
|
||||
$this->assertEquals($oTextRun->getParagraphStyle(), 'pStyle');
|
||||
}
|
||||
|
|
@ -49,7 +49,7 @@ class TextRunTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oTextRun = new TextRun(array('spacing' => 100));
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\TextRun', $oTextRun);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\TextRun', $oTextRun);
|
||||
$this->assertCount(0, $oTextRun->getElements());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oTextRun->getParagraphStyle());
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ class TextRunTest extends \PHPUnit_Framework_TestCase
|
|||
$oTextRun = new TextRun();
|
||||
$element = $oTextRun->addText('text');
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Text', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element);
|
||||
$this->assertCount(1, $oTextRun->getElements());
|
||||
$this->assertEquals($element->getText(), 'text');
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ class TextRunTest extends \PHPUnit_Framework_TestCase
|
|||
$oTextRun = new TextRun();
|
||||
$element = $oTextRun->addText(utf8_decode('ééé'));
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Text', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element);
|
||||
$this->assertCount(1, $oTextRun->getElements());
|
||||
$this->assertEquals($element->getText(), 'ééé');
|
||||
}
|
||||
|
|
@ -88,7 +88,7 @@ class TextRunTest extends \PHPUnit_Framework_TestCase
|
|||
$oTextRun = new TextRun();
|
||||
$element = $oTextRun->addLink('http://www.google.fr');
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Link', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element);
|
||||
$this->assertCount(1, $oTextRun->getElements());
|
||||
$this->assertEquals($element->getLinkSrc(), 'http://www.google.fr');
|
||||
}
|
||||
|
|
@ -101,7 +101,7 @@ class TextRunTest extends \PHPUnit_Framework_TestCase
|
|||
$oTextRun = new TextRun();
|
||||
$element = $oTextRun->addLink('http://www.google.fr', utf8_decode('ééé'));
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Link', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element);
|
||||
$this->assertCount(1, $oTextRun->getElements());
|
||||
$this->assertEquals($element->getLinkSrc(), 'http://www.google.fr');
|
||||
$this->assertEquals($element->getLinkName(), 'ééé');
|
||||
|
|
@ -128,7 +128,7 @@ class TextRunTest extends \PHPUnit_Framework_TestCase
|
|||
$oTextRun = new TextRun();
|
||||
$element = $oTextRun->addImage($src);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Image', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element);
|
||||
$this->assertCount(1, $oTextRun->getElements());
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ class TextRunTest extends \PHPUnit_Framework_TestCase
|
|||
$oTextRun = new TextRun();
|
||||
$element = $oTextRun->createFootnote();
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Footnote', $element);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Footnote', $element);
|
||||
$this->assertCount(1, $oTextRun->getElements());
|
||||
}
|
||||
}
|
||||
|
|
@ -7,13 +7,13 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Text;
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Text
|
||||
* Test class for PhpOffice\PhpWord\Element\Text
|
||||
*
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
|
|
@ -26,7 +26,7 @@ class TextTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oText = new Text();
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Text', $oText);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $oText);
|
||||
$this->assertEquals(null, $oText->getText());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oText->getFontStyle());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oText->getParagraphStyle());
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Section;
|
||||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Section\Title;
|
||||
use PhpOffice\PhpWord\Element\Title;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Section\Title
|
||||
* Test class for PhpOffice\PhpWord\Element\Title
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Section\Title
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Element\Title
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class TitleTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -26,7 +26,7 @@ class TitleTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oTitle = new Title('text');
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\Title', $oTitle);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Title', $oTitle);
|
||||
$this->assertEquals($oTitle->getText(), 'text');
|
||||
}
|
||||
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Exceptions;
|
||||
namespace PhpOffice\PhpWord\Tests\Exception;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\Exception;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Exceptions\Exception
|
||||
* Test class for PhpOffice\PhpWord\Exception\Exception
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Exception\Exception
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class ExceptionTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -22,8 +22,8 @@ class ExceptionTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Throw new exception
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @covers \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
* @covers \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function testThrowException()
|
||||
{
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Exceptions;
|
||||
namespace PhpOffice\PhpWord\Tests\Exception;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\InvalidImageException;
|
||||
use PhpOffice\PhpWord\Exception\InvalidImageException;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Exceptions\InvalidImageException
|
||||
* Test class for PhpOffice\PhpWord\Exception\InvalidImageException
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Exceptions\InvalidImageException
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Exception\InvalidImageException
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class InvalidImageExceptionTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -22,8 +22,8 @@ class InvalidImageExceptionTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Throw new exception
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\InvalidImageException
|
||||
* @covers \PhpOffice\PhpWord\Exceptions\InvalidImageException
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\InvalidImageException
|
||||
* @covers \PhpOffice\PhpWord\Exception\InvalidImageException
|
||||
*/
|
||||
public function testThrowException()
|
||||
{
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Exceptions;
|
||||
namespace PhpOffice\PhpWord\Tests\Exception;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\InvalidStyleException;
|
||||
use PhpOffice\PhpWord\Exception\InvalidStyleException;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Exceptions\InvalidStyleException
|
||||
* Test class for PhpOffice\PhpWord\Exception\InvalidStyleException
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Exceptions\InvalidStyleException
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Exception\InvalidStyleException
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class InvalidStyleExceptionTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -22,8 +22,8 @@ class InvalidStyleExceptionTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Throw new exception
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\InvalidStyleException
|
||||
* @covers \PhpOffice\PhpWord\Exceptions\InvalidStyleException
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\InvalidStyleException
|
||||
* @covers \PhpOffice\PhpWord\Exception\InvalidStyleException
|
||||
*/
|
||||
public function testThrowException()
|
||||
{
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
*/
|
||||
|
||||
namespace PhpOffice\PhpWord\Tests\Exceptions;
|
||||
namespace PhpOffice\PhpWord\Tests\Exception;
|
||||
|
||||
use PhpOffice\PhpWord\Exceptions\UnsupportedImageTypeException;
|
||||
use PhpOffice\PhpWord\Exception\UnsupportedImageTypeException;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Exceptions\UnsupportedImageTypeExceptionTest
|
||||
* Test class for PhpOffice\PhpWord\Exception\UnsupportedImageTypeExceptionTest
|
||||
*
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Exceptions\UnsupportedImageTypeExceptionTest
|
||||
* @coversDefaultClass \PhpOffice\PhpWord\Exception\UnsupportedImageTypeExceptionTest
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class UnsupportedImageTypeExceptionTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -22,8 +22,8 @@ class UnsupportedImageTypeExceptionTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Throw new exception
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\UnsupportedImageTypeException
|
||||
* @covers \PhpOffice\PhpWord\Exceptions\UnsupportedImageTypeException
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\UnsupportedImageTypeException
|
||||
* @covers \PhpOffice\PhpWord\Exception\UnsupportedImageTypeException
|
||||
*/
|
||||
public function testThrowException()
|
||||
{
|
||||
|
|
@ -23,7 +23,7 @@ class FootnoteTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testFootnote()
|
||||
{
|
||||
$footnoteElement = new \PhpOffice\PhpWord\Section\Footnote();
|
||||
$footnoteElement = new \PhpOffice\PhpWord\Element\Footnote();
|
||||
$rIdFootnote = Footnote::addFootnoteElement($footnoteElement);
|
||||
$rIdLink = Footnote::addFootnoteLinkElement('http://test.com');
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class IOFactoryTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Create non-existing writer
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function testNonexistentWriterCanNotBeCreated()
|
||||
{
|
||||
|
|
@ -54,7 +54,7 @@ class IOFactoryTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Create non-existing reader
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function testNonexistentReaderCanNotBeCreated()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
namespace PhpOffice\PhpWord\Tests;
|
||||
|
||||
use PhpOffice\PhpWord\Media;
|
||||
use PhpOffice\PhpWord\Section;
|
||||
use PhpOffice\PhpWord\Section\Image;
|
||||
use PhpOffice\PhpWord\Container\Section;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Media
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace PhpOffice\PhpWord\Tests;
|
|||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\DocumentProperties;
|
||||
use PhpOffice\PhpWord\Section;
|
||||
use PhpOffice\PhpWord\Container\Section;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
|
||||
/**
|
||||
|
|
@ -140,7 +140,7 @@ class PhpWordTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Test load template exception
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function testLoadTemplateException()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class Word2007Test extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Can read exception
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function testCanReadFailed()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class FontTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Test line height exception by using nonnumeric value
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\InvalidStyleException
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\InvalidStyleException
|
||||
*/
|
||||
public function testLineHeightException()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ class ParagraphTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Test line height exception by using nonnumeric value
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\InvalidStyleException
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\InvalidStyleException
|
||||
*/
|
||||
public function testLineHeightException()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ final class TemplateTest extends \PHPUnit_Framework_TestCase
|
|||
* XSL stylesheet cannot be applied on failure in setting parameter value
|
||||
*
|
||||
* @covers ::applyXslStyleSheet
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
* @expectedExceptionMessage Could not set values for the given XSL style sheet parameters.
|
||||
* @test
|
||||
*/
|
||||
|
|
@ -117,7 +117,7 @@ final class TemplateTest extends \PHPUnit_Framework_TestCase
|
|||
* XSL stylesheet can be applied on failure of loading XML from template
|
||||
*
|
||||
* @covers ::applyXslStyleSheet
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
* @expectedExceptionMessage Could not load XML from the given template.
|
||||
* @test
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class ODTextTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Construct with null
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
* @expectedExceptionMessage No PhpWord assigned.
|
||||
*/
|
||||
public function testConstructWithNull()
|
||||
|
|
@ -105,7 +105,7 @@ class ODTextTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Save with no PhpWord object assigned
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
* @expectedExceptionMessage PhpWord object unassigned.
|
||||
*/
|
||||
public function testSaveException()
|
||||
|
|
@ -137,7 +137,7 @@ class ODTextTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Use disk caching exception
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function testSetUseDiskCachingException()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class RTFTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Construct with null
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
* @expectedExceptionMessage No PhpWord assigned.
|
||||
*/
|
||||
public function testConstructWithNull()
|
||||
|
|
@ -94,7 +94,7 @@ class RTFTest extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Save with no PhpWord object assigned
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
* @expectedExceptionMessage PhpWord object unassigned.
|
||||
*/
|
||||
public function testSaveException()
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class FooterTest extends \PHPUnit_Framework_TestCase
|
|||
public function testWriteFooter()
|
||||
{
|
||||
$imageSrc = __DIR__ . "/../../_files/images/PhpWord.png";
|
||||
$container = new \PhpOffice\PhpWord\Section\Footer(1);
|
||||
$container = new \PhpOffice\PhpWord\Container\Footer(1);
|
||||
$container->addText('');
|
||||
$container->addPreserveText('');
|
||||
$container->addTextBreak();
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$imageSrc = __DIR__ . "/../../_files/images/PhpWord.png";
|
||||
|
||||
$container = new \PhpOffice\PhpWord\Section\Header(1);
|
||||
$container = new \PhpOffice\PhpWord\Container\Header(1);
|
||||
$container->addText('Test');
|
||||
$container->addPreserveText('');
|
||||
$container->addTextBreak();
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ class Word2007Test extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Save with no PhpWord object assigned
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
* @expectedExceptionMessage PhpWord object unassigned.
|
||||
*/
|
||||
public function testSaveException()
|
||||
|
|
@ -181,7 +181,7 @@ class Word2007Test extends \PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Use disk caching exception
|
||||
*
|
||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||
* @expectedException \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function testSetUseDiskCachingException()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue