composer update
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_RichText_TextElement
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -18,91 +19,87 @@
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_RichText
|
||||
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_RichText_TextElement
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_RichText
|
||||
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_RichText_TextElement implements PHPExcel_RichText_ITextElement
|
||||
{
|
||||
/**
|
||||
* Text
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_text;
|
||||
/**
|
||||
* Text
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $text;
|
||||
|
||||
/**
|
||||
* Create a new PHPExcel_RichText_TextElement instance
|
||||
*
|
||||
* @param string $pText Text
|
||||
* @param string $pText Text
|
||||
*/
|
||||
public function __construct($pText = '')
|
||||
{
|
||||
// Initialise variables
|
||||
$this->_text = $pText;
|
||||
// Initialise variables
|
||||
$this->text = $pText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get text
|
||||
*
|
||||
* @return string Text
|
||||
*/
|
||||
public function getText() {
|
||||
return $this->_text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set text
|
||||
*
|
||||
* @param $pText string Text
|
||||
* @return PHPExcel_RichText_ITextElement
|
||||
*/
|
||||
public function setText($pText = '') {
|
||||
$this->_text = $pText;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get font
|
||||
*
|
||||
* @return PHPExcel_Style_Font
|
||||
*/
|
||||
public function getFont() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get hash code
|
||||
*
|
||||
* @return string Hash code
|
||||
*/
|
||||
public function getHashCode() {
|
||||
return md5(
|
||||
$this->_text
|
||||
. __CLASS__
|
||||
);
|
||||
/**
|
||||
* Get text
|
||||
*
|
||||
* @return string Text
|
||||
*/
|
||||
public function getText()
|
||||
{
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement PHP __clone to create a deep clone, not just a shallow copy.
|
||||
*/
|
||||
public function __clone() {
|
||||
$vars = get_object_vars($this);
|
||||
foreach ($vars as $key => $value) {
|
||||
if (is_object($value)) {
|
||||
$this->$key = clone $value;
|
||||
} else {
|
||||
$this->$key = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Set text
|
||||
*
|
||||
* @param $pText string Text
|
||||
* @return PHPExcel_RichText_ITextElement
|
||||
*/
|
||||
public function setText($pText = '')
|
||||
{
|
||||
$this->text = $pText;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get font
|
||||
*
|
||||
* @return PHPExcel_Style_Font
|
||||
*/
|
||||
public function getFont()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get hash code
|
||||
*
|
||||
* @return string Hash code
|
||||
*/
|
||||
public function getHashCode()
|
||||
{
|
||||
return md5(
|
||||
$this->text .
|
||||
__CLASS__
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement PHP __clone to create a deep clone, not just a shallow copy.
|
||||
*/
|
||||
public function __clone()
|
||||
{
|
||||
$vars = get_object_vars($this);
|
||||
foreach ($vars as $key => $value) {
|
||||
if (is_object($value)) {
|
||||
$this->$key = clone $value;
|
||||
} else {
|
||||
$this->$key = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user