2012-05-06 18:25:40 +02:00
|
|
|
<?php
|
|
|
|
|
/**
|
2014-03-26 16:33:20 +07:00
|
|
|
* PHPWord
|
2012-05-06 18:25:40 +02:00
|
|
|
*
|
2014-03-27 23:55:06 +07:00
|
|
|
* @link https://github.com/PHPOffice/PHPWord
|
|
|
|
|
* @copyright 2014 PHPWord
|
2014-05-04 21:03:28 +04:00
|
|
|
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
|
2012-05-06 18:25:40 +02:00
|
|
|
*/
|
|
|
|
|
|
2014-03-31 01:13:02 +07:00
|
|
|
namespace PhpOffice\PhpWord\Element;
|
2013-12-16 06:40:30 -05:00
|
|
|
|
2014-03-22 10:06:08 +04:00
|
|
|
use PhpOffice\PhpWord\Style\Paragraph;
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Textrun/paragraph element
|
|
|
|
|
*/
|
2014-04-26 13:29:43 +07:00
|
|
|
class TextRun extends AbstractContainer
|
2014-03-22 10:06:08 +04:00
|
|
|
{
|
2013-12-16 06:40:30 -05:00
|
|
|
/**
|
|
|
|
|
* Paragraph style
|
|
|
|
|
*
|
2014-04-16 17:22:30 +04:00
|
|
|
* @var string|\PhpOffice\PhpWord\Style\Paragraph
|
2013-12-16 06:40:30 -05:00
|
|
|
*/
|
2014-03-31 23:52:42 +07:00
|
|
|
private $paragraphStyle;
|
2013-12-16 06:40:30 -05:00
|
|
|
|
|
|
|
|
/**
|
2014-03-31 23:52:42 +07:00
|
|
|
* Create new instance
|
2013-12-16 06:40:30 -05:00
|
|
|
*
|
2014-04-16 17:22:30 +04:00
|
|
|
* @param string|array|\PhpOffice\PhpWord\Style\Paragraph $paragraphStyle
|
2013-12-16 06:40:30 -05:00
|
|
|
*/
|
2014-04-05 00:08:00 +07:00
|
|
|
public function __construct($paragraphStyle = null)
|
2013-12-16 06:40:30 -05:00
|
|
|
{
|
2014-04-02 09:01:44 +07:00
|
|
|
$this->container = 'textrun';
|
2014-04-03 08:44:41 +07:00
|
|
|
$this->paragraphStyle = $this->setStyle(new Paragraph(), $paragraphStyle);
|
2014-03-11 16:44:22 -06:00
|
|
|
}
|
|
|
|
|
|
2013-12-16 06:40:30 -05:00
|
|
|
/**
|
|
|
|
|
* Get Paragraph style
|
|
|
|
|
*
|
2014-04-16 17:22:30 +04:00
|
|
|
* @return string|\PhpOffice\PhpWord\Style\Paragraph
|
2013-12-16 06:40:30 -05:00
|
|
|
*/
|
|
|
|
|
public function getParagraphStyle()
|
|
|
|
|
{
|
2014-03-31 23:52:42 +07:00
|
|
|
return $this->paragraphStyle;
|
2013-12-15 12:56:40 +01:00
|
|
|
}
|
2014-03-11 19:26:56 +07:00
|
|
|
}
|