2014-03-22 10:06:08 +04:00
|
|
|
<?php
|
|
|
|
|
/**
|
2014-05-05 13:06:53 +04:00
|
|
|
* 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.
|
2014-03-22 10:06:08 +04:00
|
|
|
*
|
2017-11-04 22:44:12 +01:00
|
|
|
* @see https://github.com/PHPOffice/PHPWord
|
2018-03-08 23:52:25 +01:00
|
|
|
* @copyright 2010-2018 PHPWord contributors
|
2014-05-04 21:03:28 +04:00
|
|
|
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
|
2014-03-22 10:06:08 +04:00
|
|
|
*/
|
|
|
|
|
|
2014-03-31 01:13:02 +07:00
|
|
|
namespace PhpOffice\PhpWord\Element;
|
2014-03-22 10:06:08 +04:00
|
|
|
|
|
|
|
|
use PhpOffice\PhpWord\Style\Paragraph;
|
|
|
|
|
|
2014-04-26 13:29:43 +07:00
|
|
|
class Footnote extends AbstractContainer
|
2014-03-22 10:06:08 +04:00
|
|
|
{
|
2014-05-11 22:54:51 +07:00
|
|
|
/**
|
|
|
|
|
* @var string Container type
|
|
|
|
|
*/
|
|
|
|
|
protected $container = 'Footnote';
|
|
|
|
|
|
2014-03-22 10:06:08 +04:00
|
|
|
/**
|
|
|
|
|
* Paragraph style
|
|
|
|
|
*
|
2014-04-16 17:22:30 +04:00
|
|
|
* @var string|\PhpOffice\PhpWord\Style\Paragraph
|
2014-03-22 10:06:08 +04:00
|
|
|
*/
|
2014-04-09 21:35:55 +07:00
|
|
|
protected $paragraphStyle;
|
2014-03-22 10:06:08 +04:00
|
|
|
|
2014-06-08 02:31:44 +07:00
|
|
|
/**
|
2014-06-10 07:11:32 +07:00
|
|
|
* Is part of collection
|
2014-06-08 02:31:44 +07:00
|
|
|
*
|
|
|
|
|
* @var bool
|
|
|
|
|
*/
|
|
|
|
|
protected $collectionRelation = true;
|
|
|
|
|
|
2014-03-22 10:06:08 +04:00
|
|
|
/**
|
2014-03-31 23:52:42 +07:00
|
|
|
* Create new instance
|
2014-03-22 10:06:08 +04:00
|
|
|
*
|
2014-04-16 17:22:30 +04:00
|
|
|
* @param string|array|\PhpOffice\PhpWord\Style\Paragraph $paragraphStyle
|
2014-03-22 10:06:08 +04:00
|
|
|
*/
|
2014-03-31 23:52:42 +07:00
|
|
|
public function __construct($paragraphStyle = null)
|
2014-03-22 10:06:08 +04:00
|
|
|
{
|
2014-06-08 16:44:46 +07:00
|
|
|
$this->paragraphStyle = $this->setNewStyle(new Paragraph(), $paragraphStyle);
|
2014-06-08 02:31:44 +07:00
|
|
|
$this->setDocPart($this->container);
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2014-03-24 00:26:10 +07:00
|
|
|
* Get paragraph style
|
|
|
|
|
*
|
2014-04-16 17:22:30 +04:00
|
|
|
* @return string|\PhpOffice\PhpWord\Style\Paragraph
|
2014-03-22 10:06:08 +04:00
|
|
|
*/
|
|
|
|
|
public function getParagraphStyle()
|
|
|
|
|
{
|
2014-03-31 23:52:42 +07:00
|
|
|
return $this->paragraphStyle;
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Footnote Reference ID
|
|
|
|
|
*
|
2014-04-11 19:04:53 +07:00
|
|
|
* @deprecated 0.10.0
|
2017-11-18 15:55:05 +01:00
|
|
|
* @codeCoverageIgnore
|
2015-10-10 19:06:23 +04:00
|
|
|
*
|
|
|
|
|
* @return int
|
2014-03-22 10:06:08 +04:00
|
|
|
*/
|
|
|
|
|
public function getReferenceId()
|
|
|
|
|
{
|
2014-04-03 08:44:41 +07:00
|
|
|
return $this->getRelationId();
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set Footnote Reference ID
|
|
|
|
|
*
|
2014-04-11 19:04:53 +07:00
|
|
|
* @deprecated 0.10.0
|
2017-11-18 15:55:05 +01:00
|
|
|
* @codeCoverageIgnore
|
2015-10-10 19:06:23 +04:00
|
|
|
*
|
|
|
|
|
* @param int $rId
|
2014-03-22 10:06:08 +04:00
|
|
|
*/
|
2014-04-08 16:09:31 +07:00
|
|
|
public function setReferenceId($rId)
|
2014-03-22 10:06:08 +04:00
|
|
|
{
|
2014-04-08 16:09:31 +07:00
|
|
|
$this->setRelationId($rId);
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
}
|