PHPWord/src/PhpWord/Element/TextRun.php

55 lines
1.4 KiB
PHP
Raw Normal View History

2012-05-06 18:25:40 +02:00
<?php
/**
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
2012-05-06 18:25:40 +02:00
*
2014-03-27 23:55:06 +07:00
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2010-2014 PHPWord contributors
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
*/
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;
}
}