PHPWord/src/PhpWord/Element/TextRun.php

47 lines
973 B
PHP
Raw Normal View History

2012-05-06 18:25:40 +02:00
<?php
/**
* 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
* @license http://www.gnu.org/licenses/lgpl.txt LGPL
2012-05-06 18:25:40 +02:00
*/
namespace PhpOffice\PhpWord\Element;
2013-12-16 06:40:30 -05:00
use PhpOffice\PhpWord\Style\Paragraph;
/**
* Textrun/paragraph element
*/
class TextRun extends AbstractContainer
{
2013-12-16 06:40:30 -05:00
/**
* Paragraph style
*
* @var string|\PhpOffice\PhpWord\Style\Paragraph
2013-12-16 06:40:30 -05:00
*/
private $paragraphStyle;
2013-12-16 06:40:30 -05:00
/**
* Create new instance
2013-12-16 06:40:30 -05:00
*
* @param string|array|\PhpOffice\PhpWord\Style\Paragraph $paragraphStyle
2013-12-16 06:40:30 -05:00
*/
public function __construct($paragraphStyle = null)
2013-12-16 06:40:30 -05: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
*
* @return string|\PhpOffice\PhpWord\Style\Paragraph
2013-12-16 06:40:30 -05:00
*/
public function getParagraphStyle()
{
return $this->paragraphStyle;
}
}