2014-03-22 10:06:08 +04:00
|
|
|
<?php
|
|
|
|
|
/**
|
2014-03-26 16:33:20 +07:00
|
|
|
* PHPWord
|
2014-03-22 10:06:08 +04:00
|
|
|
*
|
2014-03-27 23:55:06 +07:00
|
|
|
* @link https://github.com/PHPOffice/PHPWord
|
|
|
|
|
* @copyright 2014 PHPWord
|
|
|
|
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
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
|
|
|
|
2014-03-31 23:52:42 +07:00
|
|
|
use PhpOffice\PhpWord\Container\Container;
|
2014-03-22 10:06:08 +04:00
|
|
|
use PhpOffice\PhpWord\Style\Paragraph;
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Footnote element
|
|
|
|
|
*/
|
2014-03-31 23:52:42 +07:00
|
|
|
class Footnote extends Container
|
2014-03-22 10:06:08 +04:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Paragraph style
|
|
|
|
|
*
|
2014-03-31 23:52:42 +07:00
|
|
|
* @var string|Paragraph
|
2014-03-22 10:06:08 +04:00
|
|
|
*/
|
2014-03-31 23:52:42 +07:00
|
|
|
private $paragraphStyle;
|
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-03-31 23:52:42 +07:00
|
|
|
* @param string|array|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-04-02 09:01:44 +07:00
|
|
|
$this->container = 'footnote';
|
2014-04-03 08:44:41 +07:00
|
|
|
$this->paragraphStyle = $this->setStyle(new Paragraph(), $paragraphStyle);
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2014-03-24 00:26:10 +07:00
|
|
|
* Get paragraph style
|
|
|
|
|
*
|
2014-03-31 23:52:42 +07:00
|
|
|
* @return string|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
|
|
|
|
|
*
|
|
|
|
|
* @return int
|
2014-04-03 08:44:41 +07:00
|
|
|
* @deprecated 0.9.2
|
2014-04-03 11:34:06 +07:00
|
|
|
* @codeCoverageIgnore
|
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
|
|
|
|
|
*
|
|
|
|
|
* @param int $refId
|
2014-04-03 08:44:41 +07:00
|
|
|
* @deprecated 0.9.2
|
2014-04-03 11:34:06 +07:00
|
|
|
* @codeCoverageIgnore
|
2014-03-22 10:06:08 +04:00
|
|
|
*/
|
|
|
|
|
public function setReferenceId($refId)
|
|
|
|
|
{
|
2014-04-03 08:44:41 +07:00
|
|
|
$this->setRelationId($refId);
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
}
|