[IMPROVED] Dockblocks as per https://github.com/PHPOffice/PHPWord/pull/187.
This commit is contained in:
parent
4849bb271c
commit
2c1c1ea60f
|
|
@ -9,27 +9,15 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Element\Element;
|
||||
use PhpOffice\PhpWord\Element\Footnote as FootnoteElement;
|
||||
use PhpOffice\PhpWord\Endnotes;
|
||||
use PhpOffice\PhpWord\Exception\InvalidObjectException;
|
||||
use PhpOffice\PhpWord\Footnotes;
|
||||
use PhpOffice\PhpWord\Media;
|
||||
use PhpOffice\PhpWord\Shared\String;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\TOC;
|
||||
use PhpOffice\PhpWord\Footnotes;
|
||||
use PhpOffice\PhpWord\Endnotes;
|
||||
use PhpOffice\PhpWord\Shared\String;
|
||||
use PhpOffice\PhpWord\Element\Element;
|
||||
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 as FootnoteElement;
|
||||
use PhpOffice\PhpWord\Element\Endnote;
|
||||
use PhpOffice\PhpWord\Element\CheckBox;
|
||||
|
||||
/**
|
||||
* Container abstract class
|
||||
|
|
@ -282,11 +270,12 @@ abstract class AbstractElement
|
|||
/**
|
||||
* Add OLE-object element
|
||||
*
|
||||
* All exceptions should be handled by PhpOffice\PhpWord\Element\Object
|
||||
* All exceptions should be handled by \PhpOffice\PhpWord\Element\Object
|
||||
*
|
||||
* @param string $src
|
||||
* @param mixed $style
|
||||
* @return Object
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
* @todo Enable OLE object element in header and footer
|
||||
*/
|
||||
public function addObject($src, $style = null)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class Cell extends AbstractElement
|
|||
/**
|
||||
* Cell style
|
||||
*
|
||||
* @var CellStyle
|
||||
* @var \PhpOffice\PhpWord\Style\Cell
|
||||
*/
|
||||
private $cellStyle;
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ class Cell extends AbstractElement
|
|||
* @param string $docPart section|header|footer
|
||||
* @param int $docPartId
|
||||
* @param int $width
|
||||
* @param array|CellStyle $style
|
||||
* @param array|\PhpOffice\PhpWord\Style\Cell $style
|
||||
*/
|
||||
public function __construct($docPart, $docPartId, $width = null, $style = null)
|
||||
{
|
||||
|
|
@ -49,7 +49,7 @@ class Cell extends AbstractElement
|
|||
/**
|
||||
* Get cell style
|
||||
*
|
||||
* @return CellStyle
|
||||
* @return \PhpOffice\PhpWord\Style\Cell
|
||||
*/
|
||||
public function getStyle()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,14 +34,14 @@ class CheckBox extends AbstractElement
|
|||
/**
|
||||
* Text style
|
||||
*
|
||||
* @var string|Font
|
||||
* @var string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
private $fontStyle;
|
||||
|
||||
/**
|
||||
* Paragraph style
|
||||
*
|
||||
* @var string|Paragraph
|
||||
* @var string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
private $paragraphStyle;
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ class CheckBox extends AbstractElement
|
|||
*
|
||||
* @param mixed $style
|
||||
* @param mixed $paragraphStyle
|
||||
* @return string|Font
|
||||
* @return string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
public function setFontStyle($style = null, $paragraphStyle = null)
|
||||
{
|
||||
|
|
@ -90,7 +90,7 @@ class CheckBox extends AbstractElement
|
|||
/**
|
||||
* Get Text style
|
||||
*
|
||||
* @return string|Font
|
||||
* @return string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
public function getFontStyle()
|
||||
{
|
||||
|
|
@ -101,7 +101,7 @@ class CheckBox extends AbstractElement
|
|||
* Set Paragraph style
|
||||
*
|
||||
* @param mixed $style
|
||||
* @return string|Paragraph
|
||||
* @return string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
public function setParagraphStyle($style = null)
|
||||
{
|
||||
|
|
@ -121,7 +121,7 @@ class CheckBox extends AbstractElement
|
|||
/**
|
||||
* Get Paragraph style
|
||||
*
|
||||
* @return string|Paragraph
|
||||
* @return string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
public function getParagraphStyle()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class Endnote extends Footnote
|
|||
/**
|
||||
* Create new instance
|
||||
*
|
||||
* @param string|array|Paragraph $paragraphStyle
|
||||
* @param string|array|\PhpOffice\PhpWord\Style\Paragraph $paragraphStyle
|
||||
*/
|
||||
public function __construct($paragraphStyle = null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@ class Footnote extends AbstractElement
|
|||
/**
|
||||
* Paragraph style
|
||||
*
|
||||
* @var string|Paragraph
|
||||
* @var string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
protected $paragraphStyle;
|
||||
|
||||
/**
|
||||
* Create new instance
|
||||
*
|
||||
* @param string|array|Paragraph $paragraphStyle
|
||||
* @param string|array|\PhpOffice\PhpWord\Style\Paragraph $paragraphStyle
|
||||
*/
|
||||
public function __construct($paragraphStyle = null)
|
||||
{
|
||||
|
|
@ -37,7 +37,7 @@ class Footnote extends AbstractElement
|
|||
/**
|
||||
* Get paragraph style
|
||||
*
|
||||
* @return string|Paragraph
|
||||
* @return string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
public function getParagraphStyle()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ class Image extends AbstractElement
|
|||
* @param string $source
|
||||
* @param mixed $style
|
||||
* @param boolean $isWatermark
|
||||
* @throws InvalidImageException
|
||||
* @throws UnsupportedImageTypeException
|
||||
* @throws \PhpOffice\PhpWord\Exception\InvalidImageException
|
||||
* @throws \PhpOffice\PhpWord\Exception\UnsupportedImageTypeException
|
||||
*/
|
||||
public function __construct($source, $style = null, $isWatermark = false)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,14 +34,14 @@ class Link extends AbstractElement
|
|||
/**
|
||||
* Font style
|
||||
*
|
||||
* @var string|Font
|
||||
* @var string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
private $fontStyle;
|
||||
|
||||
/**
|
||||
* Paragraph style
|
||||
*
|
||||
* @var string|Paragraph
|
||||
* @var string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
private $paragraphStyle;
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ class Link extends AbstractElement
|
|||
/**
|
||||
* Get Text style
|
||||
*
|
||||
* @return string|Font
|
||||
* @return string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
public function getFontStyle()
|
||||
{
|
||||
|
|
@ -97,7 +97,7 @@ class Link extends AbstractElement
|
|||
/**
|
||||
* Get Paragraph style
|
||||
*
|
||||
* @return string|Paragraph
|
||||
* @return string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
public function getParagraphStyle()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\Style\ListItem as ListItemStyle;
|
||||
|
||||
/**
|
||||
|
|
@ -20,7 +19,7 @@ class ListItem extends AbstractElement
|
|||
/**
|
||||
* ListItem Style
|
||||
*
|
||||
* @var ListItemStyle
|
||||
* @var \PhpOffice\PhpWord\Style\ListItem
|
||||
*/
|
||||
private $style;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class Object extends AbstractElement
|
|||
/**
|
||||
* Image Style
|
||||
*
|
||||
* @var ImageStyle
|
||||
* @var \PhpOffice\PhpWord\Style\Image
|
||||
*/
|
||||
private $style;
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ class Object extends AbstractElement
|
|||
/**
|
||||
* Get Image style
|
||||
*
|
||||
* @return ImageStyle
|
||||
* @return \PhpOffice\PhpWord\Style\Image
|
||||
*/
|
||||
public function getStyle()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,14 +27,14 @@ class PreserveText extends AbstractElement
|
|||
/**
|
||||
* Text style
|
||||
*
|
||||
* @var string|Font
|
||||
* @var string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
private $fontStyle;
|
||||
|
||||
/**
|
||||
* Paragraph style
|
||||
*
|
||||
* @var string|Paragraph
|
||||
* @var string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
private $paragraphStyle;
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ class PreserveText extends AbstractElement
|
|||
/**
|
||||
* Get Text style
|
||||
*
|
||||
* @return string|Font
|
||||
* @return string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
public function getFontStyle()
|
||||
{
|
||||
|
|
@ -73,7 +73,7 @@ class PreserveText extends AbstractElement
|
|||
/**
|
||||
* Get Paragraph style
|
||||
*
|
||||
* @return string|Paragraph
|
||||
* @return string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
public function getParagraphStyle()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class Row extends AbstractElement
|
|||
/**
|
||||
* Row style
|
||||
*
|
||||
* @var RowStyle
|
||||
* @var \PhpOffice\PhpWord\Style\Row
|
||||
*/
|
||||
private $style;
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ class Row extends AbstractElement
|
|||
/**
|
||||
* Get row style
|
||||
*
|
||||
* @return RowStyle
|
||||
* @return \PhpOffice\PhpWord\Style\Row
|
||||
*/
|
||||
public function getStyle()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class Section extends AbstractElement
|
|||
/**
|
||||
* Section settings
|
||||
*
|
||||
* @var SectionSettings
|
||||
* @var \PhpOffice\PhpWord\Style\Section
|
||||
*/
|
||||
private $settings;
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ class Section extends AbstractElement
|
|||
/**
|
||||
* Get Section Settings
|
||||
*
|
||||
* @return SectionSettings
|
||||
* @return \PhpOffice\PhpWord\Style\Section
|
||||
*/
|
||||
public function getSettings()
|
||||
{
|
||||
|
|
@ -99,7 +99,7 @@ class Section extends AbstractElement
|
|||
* @param mixed $styleTOC
|
||||
* @param integer $minDepth
|
||||
* @param integer $maxDepth
|
||||
* @return TOC
|
||||
* @return \PhpOffice\PhpWord\TOC
|
||||
*/
|
||||
public function addTOC($styleFont = null, $styleTOC = null, $minDepth = 1, $maxDepth = 9)
|
||||
{
|
||||
|
|
@ -176,7 +176,7 @@ class Section extends AbstractElement
|
|||
* @param string $type
|
||||
* @param boolean $header
|
||||
* @return Header|Footer
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
* @since 0.9.2
|
||||
*/
|
||||
private function addHeaderFooter($type = Header::AUTO, $header = true)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Element\Row;
|
||||
use PhpOffice\PhpWord\Element\Cell;
|
||||
use PhpOffice\PhpWord\Style\Table as TableStyle;
|
||||
|
||||
/**
|
||||
|
|
@ -21,7 +19,7 @@ class Table extends AbstractElement
|
|||
/**
|
||||
* Table style
|
||||
*
|
||||
* @var TableStyle
|
||||
* @var \PhpOffice\PhpWord\Style\Table
|
||||
*/
|
||||
private $style;
|
||||
|
||||
|
|
@ -93,7 +91,7 @@ class Table extends AbstractElement
|
|||
/**
|
||||
* Get table style
|
||||
*
|
||||
* @return TableStyle
|
||||
* @return \PhpOffice\PhpWord\Style\Table
|
||||
*/
|
||||
public function getStyle()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,14 +27,14 @@ class Text extends AbstractElement
|
|||
/**
|
||||
* Text style
|
||||
*
|
||||
* @var string|Font
|
||||
* @var string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
private $fontStyle;
|
||||
|
||||
/**
|
||||
* Paragraph style
|
||||
*
|
||||
* @var string|Paragraph
|
||||
* @var string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
private $paragraphStyle;
|
||||
|
||||
|
|
@ -55,9 +55,9 @@ class Text extends AbstractElement
|
|||
/**
|
||||
* Set Text style
|
||||
*
|
||||
* @param string|array|Font $style
|
||||
* @param string|array|Paragraph $paragraphStyle
|
||||
* @return string|Font
|
||||
* @param string|array|\PhpOffice\PhpWord\Style\Font $style
|
||||
* @param string|array|\PhpOffice\PhpWord\Style\Paragraph $paragraphStyle
|
||||
* @return string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
public function setFontStyle($style = null, $paragraphStyle = null)
|
||||
{
|
||||
|
|
@ -79,7 +79,7 @@ class Text extends AbstractElement
|
|||
/**
|
||||
* Get Text style
|
||||
*
|
||||
* @return string|Font
|
||||
* @return string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
public function getFontStyle()
|
||||
{
|
||||
|
|
@ -89,8 +89,8 @@ class Text extends AbstractElement
|
|||
/**
|
||||
* Set Paragraph style
|
||||
*
|
||||
* @param string|array|Paragraph $style
|
||||
* @return string|Paragraph
|
||||
* @param string|array|\PhpOffice\PhpWord\Style\Paragraph $style
|
||||
* @return string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
public function setParagraphStyle($style = null)
|
||||
{
|
||||
|
|
@ -110,7 +110,7 @@ class Text extends AbstractElement
|
|||
/**
|
||||
* Get Paragraph style
|
||||
*
|
||||
* @return string|Paragraph
|
||||
* @return string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
public function getParagraphStyle()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@ class TextBreak extends AbstractElement
|
|||
/**
|
||||
* Paragraph style
|
||||
*
|
||||
* @var string|Paragraph
|
||||
* @var string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
private $paragraphStyle = null;
|
||||
|
||||
/**
|
||||
* Text style
|
||||
*
|
||||
* @var string|Font
|
||||
* @var string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
private $fontStyle = null;
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ class TextBreak extends AbstractElement
|
|||
*
|
||||
* @param mixed $style
|
||||
* @param mixed $paragraphStyle
|
||||
* @return string|Font
|
||||
* @return string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
public function setFontStyle($style = null, $paragraphStyle = null)
|
||||
{
|
||||
|
|
@ -72,7 +72,7 @@ class TextBreak extends AbstractElement
|
|||
/**
|
||||
* Get Text style
|
||||
*
|
||||
* @return string|Font
|
||||
* @return string|\PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
public function getFontStyle()
|
||||
{
|
||||
|
|
@ -82,8 +82,8 @@ class TextBreak extends AbstractElement
|
|||
/**
|
||||
* Set Paragraph style
|
||||
*
|
||||
* @param string|array|Paragraph $style
|
||||
* @return string|Paragraph
|
||||
* @param string|array|\PhpOffice\PhpWord\Style\Paragraph $style
|
||||
* @return string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
public function setParagraphStyle($style = null)
|
||||
{
|
||||
|
|
@ -101,7 +101,7 @@ class TextBreak extends AbstractElement
|
|||
/**
|
||||
* Get Paragraph style
|
||||
*
|
||||
* @return string|Paragraph
|
||||
* @return string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
public function getParagraphStyle()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@ class TextRun extends AbstractElement
|
|||
/**
|
||||
* Paragraph style
|
||||
*
|
||||
* @var string|Paragraph
|
||||
* @var string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
private $paragraphStyle;
|
||||
|
||||
/**
|
||||
* Create new instance
|
||||
*
|
||||
* @param string|array|Paragraph $paragraphStyle
|
||||
* @param string|array|\PhpOffice\PhpWord\Style\Paragraph $paragraphStyle
|
||||
*/
|
||||
public function __construct($paragraphStyle = null)
|
||||
{
|
||||
|
|
@ -37,7 +37,7 @@ class TextRun extends AbstractElement
|
|||
/**
|
||||
* Get Paragraph style
|
||||
*
|
||||
* @return string|Paragraph
|
||||
* @return string|\PhpOffice\PhpWord\Style\Paragraph
|
||||
*/
|
||||
public function getParagraphStyle()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
namespace PhpOffice\PhpWord;
|
||||
|
||||
use PhpOffice\PhpWord\Media;
|
||||
use PhpOffice\PhpWord\Element\Endnote;
|
||||
|
||||
/**
|
||||
* Endnote collection
|
||||
*
|
||||
|
|
@ -29,7 +26,7 @@ class Endnotes
|
|||
/**
|
||||
* Add new element
|
||||
*
|
||||
* @param Endnote $element
|
||||
* @param \PhpOffice\PhpWord\Element\Endnote $element
|
||||
* @return integer Reference ID
|
||||
*/
|
||||
public static function addElement($element)
|
||||
|
|
@ -44,7 +41,7 @@ class Endnotes
|
|||
* Set element
|
||||
*
|
||||
* @param integer $index
|
||||
* @param Endnote $element
|
||||
* @param \PhpOffice\PhpWord\Element\Endnote $element
|
||||
*/
|
||||
public static function setElement($index, $element)
|
||||
{
|
||||
|
|
@ -57,7 +54,7 @@ class Endnotes
|
|||
* Get element by index
|
||||
*
|
||||
* @param integer $index
|
||||
* @return Endnote
|
||||
* @return \PhpOffice\PhpWord\Element\Endnote
|
||||
*/
|
||||
public static function getElement($index)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
namespace PhpOffice\PhpWord;
|
||||
|
||||
use PhpOffice\PhpWord\Media;
|
||||
use PhpOffice\PhpWord\Element\Footnote;
|
||||
|
||||
/**
|
||||
* Footnote collection
|
||||
*/
|
||||
|
|
@ -27,7 +24,7 @@ class Footnotes
|
|||
/**
|
||||
* Add new element
|
||||
*
|
||||
* @param Footnote $element
|
||||
* @param \PhpOffice\PhpWord\Element\Footnote $element
|
||||
* @return integer Reference ID
|
||||
* @since 0.9.2
|
||||
*/
|
||||
|
|
@ -43,7 +40,7 @@ class Footnotes
|
|||
* Set element
|
||||
*
|
||||
* @param integer $index
|
||||
* @param Footnote $element
|
||||
* @param \PhpOffice\PhpWord\Element\Footnote $element
|
||||
* @since 0.9.2
|
||||
*/
|
||||
public static function setElement($index, $element)
|
||||
|
|
@ -57,7 +54,7 @@ class Footnotes
|
|||
* Get element by index
|
||||
*
|
||||
* @param integer $index
|
||||
* @return Footnote
|
||||
* @return \PhpOffice\PhpWord\Element\Footnote
|
||||
* @since 0.9.2
|
||||
*/
|
||||
public static function getElement($index)
|
||||
|
|
@ -104,7 +101,7 @@ class Footnotes
|
|||
/**
|
||||
* Add new footnote
|
||||
*
|
||||
* @param Footnote $element
|
||||
* @param \PhpOffice\PhpWord\Element\Footnote $element
|
||||
* @return integer Reference ID
|
||||
* @deprecated 0.9.2
|
||||
* @codeCoverageIgnore
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
namespace PhpOffice\PhpWord;
|
||||
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Writer\WriterInterface;
|
||||
use PhpOffice\PhpWord\Reader\ReaderInterface;
|
||||
|
||||
/**
|
||||
* IO factory
|
||||
|
|
@ -23,8 +21,8 @@ abstract class IOFactory
|
|||
*
|
||||
* @param PhpWord $phpWord
|
||||
* @param string $name
|
||||
* @return WriterInterface
|
||||
* @throws Exception
|
||||
* @return \PhpOffice\PhpWord\Writer\WriterInterface
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public static function createWriter(PhpWord $phpWord, $name = 'Word2007')
|
||||
{
|
||||
|
|
@ -40,8 +38,8 @@ abstract class IOFactory
|
|||
* Create new reader
|
||||
*
|
||||
* @param string $name
|
||||
* @return ReaderInterface
|
||||
* @throws Exception
|
||||
* @return \PhpOffice\PhpWord\Reader\ReaderInterface
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public static function createReader($name = 'Word2007')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
namespace PhpOffice\PhpWord;
|
||||
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
|
||||
/**
|
||||
* Media collection
|
||||
|
|
@ -30,8 +30,9 @@ class Media
|
|||
* @param string $container section|headerx|footerx|footnote|endnote
|
||||
* @param string $mediaType image|object|link
|
||||
* @param string $source
|
||||
* @param Image $image
|
||||
* @param \PhpOffice\PhpWord\Element\Image $image
|
||||
* @return integer
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
* @since 0.9.2
|
||||
*/
|
||||
public static function addElement($container, $mediaType, $source, Image $image = null)
|
||||
|
|
@ -168,7 +169,7 @@ class Media
|
|||
*
|
||||
* @param string $src
|
||||
* @param string $type
|
||||
* @param Image $image
|
||||
* @param \PhpOffice\PhpWord\Element\Image $image
|
||||
* @return integer
|
||||
* @deprecated 0.9.2
|
||||
* @codeCoverageIgnore
|
||||
|
|
@ -222,7 +223,7 @@ class Media
|
|||
*
|
||||
* @param integer $headerCount
|
||||
* @param string $src
|
||||
* @param Image $image
|
||||
* @param \PhpOffice\PhpWord\Element\Image $image
|
||||
* @return integer
|
||||
* @deprecated 0.9.2
|
||||
* @codeCoverageIgnore
|
||||
|
|
@ -262,7 +263,7 @@ class Media
|
|||
*
|
||||
* @param integer $footerCount
|
||||
* @param string $src
|
||||
* @param Image $image
|
||||
* @param \PhpOffice\PhpWord\Element\Image $image
|
||||
* @return integer
|
||||
* @deprecated 0.9.2
|
||||
* @codeCoverageIgnore
|
||||
|
|
|
|||
|
|
@ -9,11 +9,9 @@
|
|||
|
||||
namespace PhpOffice\PhpWord;
|
||||
|
||||
use PhpOffice\PhpWord\DocumentProperties;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Element\Section;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\Template;
|
||||
|
||||
/**
|
||||
* PHPWord main class
|
||||
|
|
@ -55,7 +53,7 @@ class PhpWord
|
|||
/**
|
||||
* Collection of sections
|
||||
*
|
||||
* @var Section[]
|
||||
* @var \PhpOffice\PhpWord\Element\Section[]
|
||||
*/
|
||||
private $sections = array();
|
||||
|
||||
|
|
@ -96,7 +94,7 @@ class PhpWord
|
|||
* Create new section
|
||||
*
|
||||
* @param array $settings
|
||||
* @return Section
|
||||
* @return \PhpOffice\PhpWord\Element\Section
|
||||
*/
|
||||
public function addSection($settings = null)
|
||||
{
|
||||
|
|
@ -217,7 +215,7 @@ class PhpWord
|
|||
/**
|
||||
* Get all sections
|
||||
*
|
||||
* @return Section[]
|
||||
* @return \PhpOffice\PhpWord\Element\Section[]
|
||||
*/
|
||||
public function getSections()
|
||||
{
|
||||
|
|
@ -229,7 +227,7 @@ class PhpWord
|
|||
*
|
||||
* @param string $filename Fully qualified filename.
|
||||
* @return Template
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function loadTemplate($filename)
|
||||
{
|
||||
|
|
@ -244,7 +242,7 @@ class PhpWord
|
|||
* Create new section
|
||||
*
|
||||
* @param array $settings
|
||||
* @return Section
|
||||
* @return \PhpOffice\PhpWord\Element\Section
|
||||
* @deprecated 0.9.2
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ abstract class AbstractReader implements ReaderInterface
|
|||
*
|
||||
* @param string $pFilename
|
||||
* @return resource
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
protected function openFile($pFilename)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,13 +9,11 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Reader;
|
||||
|
||||
use PhpOffice\PhpWord\DocumentProperties;
|
||||
use PhpOffice\PhpWord\Footnote;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Settings;
|
||||
use PhpOffice\PhpWord\Footnote;
|
||||
use PhpOffice\PhpWord\Endnotes;
|
||||
use PhpOffice\PhpWord\DocumentProperties;
|
||||
use PhpOffice\PhpWord\Shared\XMLReader;
|
||||
use PhpOffice\PhpWord\Element\Section;
|
||||
|
||||
/**
|
||||
* Reader for Word2007
|
||||
|
|
@ -29,7 +27,7 @@ class Word2007 extends AbstractReader implements ReaderInterface
|
|||
/**
|
||||
* PhpWord object
|
||||
*
|
||||
* @var PhpWord
|
||||
* @var \PhpOffice\PhpWord\PhpWord
|
||||
*/
|
||||
private $phpWord;
|
||||
|
||||
|
|
@ -44,7 +42,7 @@ class Word2007 extends AbstractReader implements ReaderInterface
|
|||
* Loads PhpWord from file
|
||||
*
|
||||
* @param string $filename
|
||||
* @return PhpWord
|
||||
* @return \PhpOffice\PhpWord\PhpWord
|
||||
*/
|
||||
public function load($filename)
|
||||
{
|
||||
|
|
@ -286,7 +284,7 @@ class Word2007 extends AbstractReader implements ReaderInterface
|
|||
*
|
||||
* @param string $filename
|
||||
* @param array $settings
|
||||
* @param Section $section
|
||||
* @param \PhpOffice\PhpWord\Element\Section $section
|
||||
*/
|
||||
private function readHeaderFooter($filename, $settings, &$section)
|
||||
{
|
||||
|
|
@ -723,6 +721,7 @@ class Word2007 extends AbstractReader implements ReaderInterface
|
|||
|
||||
return $style;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read w:tblPr
|
||||
*
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class XMLWriter
|
|||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
// Desctruct XMLWriter
|
||||
// Destruct XMLWriter
|
||||
unset($this->xmlWriter);
|
||||
|
||||
// Unlink temporary files
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ require_once 'PCLZip/pclzip.lib.php';
|
|||
*/
|
||||
class ZipArchive
|
||||
{
|
||||
|
||||
/** constants */
|
||||
const OVERWRITE = 'OVERWRITE';
|
||||
const CREATE = 'CREATE';
|
||||
|
|
|
|||
|
|
@ -27,14 +27,14 @@ class TOC
|
|||
/**
|
||||
* TOC style
|
||||
*
|
||||
* @var TOCStyle
|
||||
* @var \PhpOffice\PhpWord\Style\TOC
|
||||
*/
|
||||
private static $TOCStyle;
|
||||
|
||||
/**
|
||||
* Font style
|
||||
*
|
||||
* @var Font|array|string
|
||||
* @var \PhpOffice\PhpWord\Style\Font|array|string
|
||||
*/
|
||||
private static $fontStyle;
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ class TOC
|
|||
/**
|
||||
* Get TOC Style
|
||||
*
|
||||
* @return TOCStyle
|
||||
* @return \PhpOffice\PhpWord\Style\TOC
|
||||
*/
|
||||
public static function getStyleTOC()
|
||||
{
|
||||
|
|
@ -172,7 +172,7 @@ class TOC
|
|||
/**
|
||||
* Get Font Style
|
||||
*
|
||||
* @return Font
|
||||
* @return \PhpOffice\PhpWord\Style\Font
|
||||
*/
|
||||
public static function getStyleFont()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
namespace PhpOffice\PhpWord;
|
||||
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Settings;
|
||||
use PhpOffice\PhpWord\Shared\String;
|
||||
|
||||
/**
|
||||
|
|
@ -57,7 +56,7 @@ class Template
|
|||
* Create a new Template Object
|
||||
*
|
||||
* @param string $strFilename
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function __construct($strFilename)
|
||||
{
|
||||
|
|
@ -97,7 +96,7 @@ class Template
|
|||
* @param \DOMDocument $xslDOMDocument
|
||||
* @param array $xslOptions
|
||||
* @param string $xslOptionsURI
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function applyXslStyleSheet(&$xslDOMDocument, $xslOptions = array(), $xslOptionsURI = '')
|
||||
{
|
||||
|
|
@ -166,7 +165,7 @@ class Template
|
|||
*
|
||||
* @param string $search
|
||||
* @param integer $numberOfClones
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function cloneRow($search, $numberOfClones)
|
||||
{
|
||||
|
|
@ -273,7 +272,7 @@ class Template
|
|||
* Save XML to temporary file
|
||||
*
|
||||
* @return string
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
|
|
@ -381,7 +380,7 @@ class Template
|
|||
*
|
||||
* @param integer $offset
|
||||
* @return integer
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
private function findRowStart($offset)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ abstract class AbstractWriter implements WriterInterface
|
|||
/**
|
||||
* PHPWord object
|
||||
*
|
||||
* @var PhpWord
|
||||
* @var \PhpOffice\PhpWord\PhpWord
|
||||
*/
|
||||
protected $phpWord = null;
|
||||
|
||||
|
|
@ -65,8 +65,8 @@ abstract class AbstractWriter implements WriterInterface
|
|||
/**
|
||||
* Get PhpWord object
|
||||
*
|
||||
* @return PhpWord
|
||||
* @throws Exception
|
||||
* @return \PhpOffice\PhpWord\PhpWord
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function getPhpWord()
|
||||
{
|
||||
|
|
@ -80,7 +80,7 @@ abstract class AbstractWriter implements WriterInterface
|
|||
/**
|
||||
* Set PhpWord object
|
||||
*
|
||||
* @param PhpWord
|
||||
* @param \PhpOffice\PhpWord\PhpWord
|
||||
* @return $this
|
||||
*/
|
||||
public function setPhpWord(PhpWord $phpWord = null)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class ODText extends AbstractWriter implements WriterInterface
|
|||
/**
|
||||
* Create new ODText writer
|
||||
*
|
||||
* @param PhpWord $phpWord
|
||||
* @param \PhpOffice\PhpWord\PhpWord $phpWord
|
||||
*/
|
||||
public function __construct(PhpWord $phpWord = null)
|
||||
{
|
||||
|
|
@ -47,7 +47,7 @@ class ODText extends AbstractWriter implements WriterInterface
|
|||
* Save PhpWord to file
|
||||
*
|
||||
* @param string $filename
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
* @todo Not in \ZipArchive::CM_STORE mode
|
||||
*/
|
||||
public function save($filename = null)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\ODText;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
use PhpOffice\PhpWord\Element\Link;
|
||||
use PhpOffice\PhpWord\Element\ListItem;
|
||||
|
|
@ -20,10 +19,11 @@ use PhpOffice\PhpWord\Element\Text;
|
|||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
use PhpOffice\PhpWord\Element\Title;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\TOC;
|
||||
|
||||
/**
|
||||
|
|
@ -34,7 +34,7 @@ class Content extends Base
|
|||
/**
|
||||
* Write content file to XML format
|
||||
*
|
||||
* @param PhpWord $phpWord
|
||||
* @param \PhpOffice\PhpWord\PhpWord $phpWord
|
||||
* @return string XML Output
|
||||
*/
|
||||
public function writeContent(PhpWord $phpWord = null)
|
||||
|
|
@ -227,8 +227,8 @@ class Content extends Base
|
|||
/**
|
||||
* Write text
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Text $text
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\Text $text
|
||||
* @param bool $withoutP
|
||||
*/
|
||||
protected function writeText(XMLWriter $xmlWriter, Text $text, $withoutP = false)
|
||||
|
|
@ -277,8 +277,8 @@ class Content extends Base
|
|||
/**
|
||||
* Write TextRun section
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param TextRun $textrun
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\TextRun $textrun
|
||||
* @todo Enable all other section types
|
||||
*/
|
||||
protected function writeTextRun(XMLWriter $xmlWriter, TextRun $textrun)
|
||||
|
|
@ -298,7 +298,7 @@ class Content extends Base
|
|||
/**
|
||||
* Write TextBreak
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
*/
|
||||
protected function writeTextBreak(XMLWriter $xmlWriter)
|
||||
{
|
||||
|
|
@ -310,7 +310,7 @@ class Content extends Base
|
|||
/**
|
||||
* Write unsupported element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param string $element
|
||||
*/
|
||||
private function writeUnsupportedElement($xmlWriter, $element)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class Meta extends AbstractWriterPart
|
|||
/**
|
||||
* Write Meta file to XML format
|
||||
*
|
||||
* @param PhpWord $phpWord
|
||||
* @param \PhpOffice\PhpWord\PhpWord $phpWord
|
||||
* @return string XML Output
|
||||
*/
|
||||
public function writeMeta(PhpWord $phpWord = null)
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@
|
|||
namespace PhpOffice\PhpWord\Writer\ODText;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
use PhpOffice\PhpWord\Style\Table;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
|
||||
/**
|
||||
* ODText styloes part writer
|
||||
|
|
@ -23,7 +23,7 @@ class Styles extends Base
|
|||
/**
|
||||
* Write Styles file to XML format
|
||||
*
|
||||
* @param PhpWord $phpWord
|
||||
* @param \PhpOffice\PhpWord\PhpWord $phpWord
|
||||
* @return string XML Output
|
||||
*/
|
||||
public function writeStyles(PhpWord $phpWord = null)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer;
|
||||
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
use PhpOffice\PhpWord\Element\Link;
|
||||
use PhpOffice\PhpWord\Element\ListItem;
|
||||
|
|
@ -21,9 +19,11 @@ use PhpOffice\PhpWord\Element\Text;
|
|||
use PhpOffice\PhpWord\Element\TextBreak;
|
||||
use PhpOffice\PhpWord\Element\TextRun;
|
||||
use PhpOffice\PhpWord\Element\Title;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Shared\Drawing;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\TOC;
|
||||
|
||||
/**
|
||||
|
|
@ -54,7 +54,7 @@ class RTF extends AbstractWriter implements WriterInterface
|
|||
|
||||
/**
|
||||
* Create new RTF writer
|
||||
* @param PhpWord $phpWord
|
||||
* @param \PhpOffice\PhpWord\PhpWord $phpWord
|
||||
*/
|
||||
public function __construct(PhpWord $phpWord = null)
|
||||
{
|
||||
|
|
@ -66,7 +66,7 @@ class RTF extends AbstractWriter implements WriterInterface
|
|||
* Save PhpWord to file
|
||||
*
|
||||
* @param string $pFilename
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function save($pFilename = null)
|
||||
{
|
||||
|
|
@ -435,7 +435,7 @@ class RTF extends AbstractWriter implements WriterInterface
|
|||
/**
|
||||
* Get unsupported element content
|
||||
*
|
||||
* @param string $element
|
||||
* @param string $element
|
||||
*/
|
||||
private function getDataContentUnsupportedElement($element)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,17 +9,17 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer;
|
||||
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Media;
|
||||
use PhpOffice\PhpWord\Element\Section;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Media;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Writer\Word2007\ContentTypes;
|
||||
use PhpOffice\PhpWord\Writer\Word2007\Rels;
|
||||
use PhpOffice\PhpWord\Writer\Word2007\DocProps;
|
||||
use PhpOffice\PhpWord\Writer\Word2007\Document;
|
||||
use PhpOffice\PhpWord\Writer\Word2007\Footer;
|
||||
use PhpOffice\PhpWord\Writer\Word2007\Notes;
|
||||
use PhpOffice\PhpWord\Writer\Word2007\Header;
|
||||
use PhpOffice\PhpWord\Writer\Word2007\Notes;
|
||||
use PhpOffice\PhpWord\Writer\Word2007\Rels;
|
||||
use PhpOffice\PhpWord\Writer\Word2007\Styles;
|
||||
|
||||
/**
|
||||
|
|
@ -44,7 +44,7 @@ class Word2007 extends AbstractWriter implements WriterInterface
|
|||
/**
|
||||
* Create new Word2007 writer
|
||||
*
|
||||
* @param PhpWord
|
||||
* @param \PhpOffice\PhpWord\PhpWord
|
||||
*/
|
||||
public function __construct(PhpWord $phpWord = null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Writer\WriterInterface;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
use PhpOffice\PhpWord\Writer\WriterInterface;
|
||||
|
||||
/**
|
||||
* Word2007 writer part abstract class
|
||||
|
|
@ -21,14 +21,14 @@ abstract class AbstractWriterPart
|
|||
/**
|
||||
* Parent writer
|
||||
*
|
||||
* @var WriterInterface
|
||||
* @var \PhpOffice\PhpWord\Writer\WriterInterface
|
||||
*/
|
||||
protected $parentWriter;
|
||||
|
||||
/**
|
||||
* Set parent writer
|
||||
*
|
||||
* @param WriterInterface $pWriter
|
||||
* @param \PhpOffice\PhpWord\Writer\WriterInterface $pWriter
|
||||
*/
|
||||
public function setParentWriter(WriterInterface $pWriter = null)
|
||||
{
|
||||
|
|
@ -38,8 +38,8 @@ abstract class AbstractWriterPart
|
|||
/**
|
||||
* Get parent writer
|
||||
*
|
||||
* @return WriterInterface
|
||||
* @throws Exception
|
||||
* @return \PhpOffice\PhpWord\Writer\WriterInterface
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
public function getParentWriter()
|
||||
{
|
||||
|
|
@ -53,7 +53,7 @@ abstract class AbstractWriterPart
|
|||
/**
|
||||
* Get XML Writer
|
||||
*
|
||||
* @return XMLWriter
|
||||
* @return \PhpOffice\PhpWord\Shared\XMLWriter
|
||||
*/
|
||||
protected function getXmlWriter()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,29 +9,29 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\Element\AbstractElement;
|
||||
use PhpOffice\PhpWord\Element\CheckBox;
|
||||
use PhpOffice\PhpWord\Element\Endnote;
|
||||
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\PreserveText;
|
||||
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\Exception\Exception;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Element\AbstractElement;
|
||||
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\Endnote;
|
||||
use PhpOffice\PhpWord\Element\CheckBox;
|
||||
use PhpOffice\PhpWord\Shared\String;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style\Cell;
|
||||
use PhpOffice\PhpWord\Style\Table as TableStyle;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style\Image as ImageStyle;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
use PhpOffice\PhpWord\Style\Table as TableStyle;
|
||||
|
||||
/**
|
||||
* Word2007 base part writer
|
||||
|
|
@ -43,8 +43,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write text element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Text $text
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\Text $text
|
||||
* @param boolean $withoutP
|
||||
*/
|
||||
protected function writeText(XMLWriter $xmlWriter, Text $text, $withoutP = false)
|
||||
|
|
@ -73,8 +73,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write textrun element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param TextRun $textrun
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\TextRun $textrun
|
||||
*/
|
||||
protected function writeTextRun(XMLWriter $xmlWriter, TextRun $textrun)
|
||||
{
|
||||
|
|
@ -88,8 +88,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write link element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Link $link
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\Link $link
|
||||
* @param boolean $withoutP
|
||||
*/
|
||||
protected function writeLink(XMLWriter $xmlWriter, Link $link, $withoutP = false)
|
||||
|
|
@ -125,8 +125,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write title element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Title $title
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\Title $title
|
||||
*/
|
||||
protected function writeTitle(XMLWriter $xmlWriter, Title $title)
|
||||
{
|
||||
|
|
@ -173,8 +173,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write preserve text element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param PreserveText $textrun
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\PreserveText $textrun
|
||||
*/
|
||||
protected function writePreserveText(XMLWriter $xmlWriter, PreserveText $textrun)
|
||||
{
|
||||
|
|
@ -237,8 +237,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write text break element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param TextBreak $element
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\TextBreak $element
|
||||
* @param boolean $withoutP
|
||||
*/
|
||||
protected function writeTextBreak(XMLWriter $xmlWriter, TextBreak $element = null, $withoutP = false)
|
||||
|
|
@ -272,8 +272,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write list item element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param ListItem $listItem
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\ListItem $listItem
|
||||
*/
|
||||
protected function writeListItem(XMLWriter $xmlWriter, ListItem $listItem)
|
||||
{
|
||||
|
|
@ -301,8 +301,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write footnote reference element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Table $table
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\Table $table
|
||||
*/
|
||||
protected function writeTable(XMLWriter $xmlWriter, Table $table)
|
||||
{
|
||||
|
|
@ -412,8 +412,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write image element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Image $image
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\Image $image
|
||||
* @param boolean $withoutP
|
||||
*/
|
||||
protected function writeImage(XMLWriter $xmlWriter, Image $image, $withoutP = false)
|
||||
|
|
@ -495,8 +495,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write watermark element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Image $image
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\Image $image
|
||||
*/
|
||||
protected function writeWatermark(XMLWriter $xmlWriter, Image $image)
|
||||
{
|
||||
|
|
@ -545,8 +545,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write object element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Object $object
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\Object $object
|
||||
* @param boolean $withoutP
|
||||
*/
|
||||
protected function writeObject(XMLWriter $xmlWriter, Object $object, $withoutP = false)
|
||||
|
|
@ -600,8 +600,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write footnote element which links to the actual content in footnotes.xml
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Footnote $footnote
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\Footnote $footnote
|
||||
* @param boolean $withoutP
|
||||
*/
|
||||
protected function writeFootnote(XMLWriter $xmlWriter, Footnote $footnote, $withoutP = false)
|
||||
|
|
@ -627,8 +627,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write endnote element which links to the actual content in endnotes.xml
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Endnote $endnote
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\Endnote $endnote
|
||||
* @param boolean $withoutP
|
||||
*/
|
||||
protected function writeEndnote(XMLWriter $xmlWriter, Endnote $endnote, $withoutP = false)
|
||||
|
|
@ -725,8 +725,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write paragraph style
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Paragraph $style
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Style\Paragraph $style
|
||||
* @param bool $withoutPPR
|
||||
*/
|
||||
protected function writeParagraphStyle(XMLWriter $xmlWriter, Paragraph $style, $withoutPPR = false)
|
||||
|
|
@ -825,8 +825,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write font style
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Font $style
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Style\Font $style
|
||||
*/
|
||||
protected function writeFontStyle(XMLWriter $xmlWriter, Font $style)
|
||||
{
|
||||
|
|
@ -929,8 +929,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write table style
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param TableStyle $style
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Style\Table $style
|
||||
* @param boolean $isFullStyle
|
||||
*/
|
||||
protected function writeTableStyle(XMLWriter $xmlWriter, TableStyle $style, $isFullStyle = true)
|
||||
|
|
@ -992,9 +992,9 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write row style
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param string $type
|
||||
* @param TableStyle $style
|
||||
* @param \PhpOffice\PhpWord\Style\Table $style
|
||||
*/
|
||||
protected function writeRowStyle(XMLWriter $xmlWriter, $type, TableStyle $style)
|
||||
{
|
||||
|
|
@ -1034,8 +1034,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write footnote reference element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Cell $style
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Style\Cell $style
|
||||
*/
|
||||
protected function writeCellStyle(XMLWriter $xmlWriter, Cell $style)
|
||||
{
|
||||
|
|
@ -1101,8 +1101,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write inline paragraph style
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Paragraph|string $styleParagraph
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Style\Paragraph|string $styleParagraph
|
||||
* @param boolean $withoutPPR
|
||||
*/
|
||||
protected function writeInlineParagraphStyle(XMLWriter $xmlWriter, $styleParagraph = null, $withoutPPR = false)
|
||||
|
|
@ -1127,8 +1127,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write inline font style
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Font|string $styleFont
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Style\Font|string $styleFont
|
||||
*/
|
||||
protected function writeInlineFontStyle(XMLWriter $xmlWriter, $styleFont = null)
|
||||
{
|
||||
|
|
@ -1148,8 +1148,8 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write container elements
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param AbstractElement $container
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\AbstractElement $container
|
||||
*/
|
||||
protected function writeContainerElements(XMLWriter $xmlWriter, AbstractElement $container)
|
||||
{
|
||||
|
|
@ -1208,7 +1208,7 @@ class Base extends AbstractWriterPart
|
|||
/**
|
||||
* Write margin or border
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param array $sizes
|
||||
* @param array $colors
|
||||
* @param array $attributes
|
||||
|
|
|
|||
|
|
@ -59,10 +59,10 @@ class ContentTypes extends AbstractWriterPart
|
|||
/**
|
||||
* Write content types element
|
||||
*
|
||||
* @param XMLWriter $xmlWriter XML Writer
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter XML Writer
|
||||
* @param array $parts
|
||||
* @param boolean $isDefault
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpWord\Exception\Exception
|
||||
*/
|
||||
private function writeContentType(XMLWriter $xmlWriter, $parts, $isDefault)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class DocProps extends AbstractWriterPart
|
|||
/**
|
||||
* Write docProps/core.xml
|
||||
*
|
||||
* @param PhpWord $phpWord
|
||||
* @param \PhpOffice\PhpWord\PhpWord $phpWord
|
||||
*/
|
||||
public function writeDocPropsCore(PhpWord $phpWord)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class Footer extends Base
|
|||
/**
|
||||
* Write word/footnotes.xml
|
||||
*
|
||||
* @param FooterElement $footer
|
||||
* @param \PhpOffice\PhpWord\Element\Footer $footer
|
||||
*/
|
||||
public function writeFooter(FooterElement $footer)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class Header extends Base
|
|||
/**
|
||||
* Write word/headerx.xml
|
||||
*
|
||||
* @param HeaderElement $header
|
||||
* @param \PhpOffice\PhpWord\Element\Header $header
|
||||
*/
|
||||
public function writeHeader(HeaderElement $header)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
use PhpOffice\PhpWord\Element\Footnote;
|
||||
use PhpOffice\PhpWord\Element\Endnote;
|
||||
use PhpOffice\PhpWord\Element\Footnote;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
|
||||
/**
|
||||
|
|
@ -81,8 +81,8 @@ class Notes extends Base
|
|||
/**
|
||||
* Write note item
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param Footnote|Endnote $element
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Element\Footnote|\PhpOffice\PhpWord\Element\Endnote $element
|
||||
* @param boolean $withoutP
|
||||
* @param string $notesTypes
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -74,11 +74,10 @@ class Rels extends AbstractWriterPart
|
|||
return $xmlWriter->getData();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Write relationships
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param null|array $xmlRels
|
||||
* @param null|array $mediaRels
|
||||
* @param integer $id
|
||||
|
|
@ -116,7 +115,7 @@ class Rels extends AbstractWriterPart
|
|||
* Format:
|
||||
* <Relationship Id="rId..." Type="http://..." Target="....xml" TargetMode="..." />
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param int $id Relationship ID
|
||||
* @param string $type Relationship type
|
||||
* @param string $target Relationship target
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ namespace PhpOffice\PhpWord\Writer\Word2007;
|
|||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
use PhpOffice\PhpWord\Style\Table;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
|
||||
/**
|
||||
* Word2007 styles part writer
|
||||
|
|
@ -24,7 +24,7 @@ class Styles extends Base
|
|||
/**
|
||||
* Write word/styles.xml
|
||||
*
|
||||
* @param PhpWord $phpWord
|
||||
* @param \PhpOffice\PhpWord\PhpWord $phpWord
|
||||
*/
|
||||
public function writeStyles(PhpWord $phpWord = null)
|
||||
{
|
||||
|
|
@ -156,7 +156,7 @@ class Styles extends Base
|
|||
/**
|
||||
* Write default font and other default styles
|
||||
*
|
||||
* @param XMLWriter $xmlWriter
|
||||
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
|
||||
* @param array $styles
|
||||
*/
|
||||
private function writeDefaultStyles(XMLWriter $xmlWriter, PhpWord $phpWord, $styles)
|
||||
|
|
|
|||
Loading…
Reference in New Issue