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