ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PHPExcel_Comment Class Reference
+ Inheritance diagram for PHPExcel_Comment:
+ Collaboration diagram for PHPExcel_Comment:

Public Member Functions

 __construct ()
 Create a new PHPExcel_Comment. More...
 
 getAuthor ()
 Get Author. More...
 
 setAuthor ($pValue='')
 Set Author. More...
 
 getText ()
 Get Rich text comment. More...
 
 setText (PHPExcel_RichText $pValue)
 Set Rich text comment. More...
 
 getWidth ()
 Get comment width (CSS style, i.e. More...
 
 setWidth ($value='96pt')
 Set comment width (CSS style, i.e. More...
 
 getHeight ()
 Get comment height (CSS style, i.e. More...
 
 setHeight ($value='55.5pt')
 Set comment height (CSS style, i.e. More...
 
 getMarginLeft ()
 Get left margin (CSS style, i.e. More...
 
 setMarginLeft ($value='59.25pt')
 Set left margin (CSS style, i.e. More...
 
 getMarginTop ()
 Get top margin (CSS style, i.e. More...
 
 setMarginTop ($value='1.5pt')
 Set top margin (CSS style, i.e. More...
 
 getVisible ()
 Is the comment visible by default? More...
 
 setVisible ($value=false)
 Set comment default visibility. More...
 
 getFillColor ()
 Get fill color. More...
 
 setAlignment ($pValue=PHPExcel_Style_Alignment::HORIZONTAL_GENERAL)
 Set Alignment. More...
 
 getAlignment ()
 Get Alignment. More...
 
 getHashCode ()
 Get hash code. More...
 
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy. More...
 
 __toString ()
 Convert to string. More...
 
 getHashCode ()
 Get hash code. More...
 

Private Attributes

 $_author
 
 $_text
 
 $_width = '96pt'
 
 $_marginLeft = '59.25pt'
 
 $_marginTop = '1.5pt'
 
 $_visible = false
 
 $_height = '55.5pt'
 
 $_fillColor
 
 $_alignment
 

Detailed Description

Definition at line 36 of file Comment.php.

Constructor & Destructor Documentation

◆ __construct()

PHPExcel_Comment::__construct ( )

Create a new PHPExcel_Comment.

Exceptions
PHPExcel_Exception

Definition at line 106 of file Comment.php.

107 {
108 // Initialise variables
109 $this->_author = 'Author';
110 $this->_text = new PHPExcel_RichText();
111 $this->_fillColor = new PHPExcel_Style_Color('FFFFFFE1');
113 }

References PHPExcel_Style_Alignment\HORIZONTAL_GENERAL.

Member Function Documentation

◆ __clone()

PHPExcel_Comment::__clone ( )

Implement PHP __clone to create a deep clone, not just a shallow copy.

Definition at line 307 of file Comment.php.

307 {
308 $vars = get_object_vars($this);
309 foreach ($vars as $key => $value) {
310 if (is_object($value)) {
311 $this->$key = clone $value;
312 } else {
313 $this->$key = $value;
314 }
315 }
316 }
$key
Definition: croninfo.php:18

References $key.

◆ __toString()

PHPExcel_Comment::__toString ( )

Convert to string.

Returns
string

Definition at line 323 of file Comment.php.

323 {
324 return $this->_text->getPlainText();
325 }

◆ getAlignment()

PHPExcel_Comment::getAlignment ( )

Get Alignment.

Returns
string

Definition at line 280 of file Comment.php.

280 {
281 return $this->_alignment;
282 }

References $_alignment.

◆ getAuthor()

PHPExcel_Comment::getAuthor ( )

Get Author.

Returns
string

Definition at line 120 of file Comment.php.

120 {
121 return $this->_author;
122 }

References $_author.

◆ getFillColor()

PHPExcel_Comment::getFillColor ( )

Get fill color.

Returns
PHPExcel_Style_Color

Definition at line 260 of file Comment.php.

260 {
261 return $this->_fillColor;
262 }

References $_fillColor.

◆ getHashCode()

PHPExcel_Comment::getHashCode ( )

Get hash code.

Returns
string Hash code

Implements PHPExcel_IComparable.

Definition at line 289 of file Comment.php.

289 {
290 return md5(
291 $this->_author
292 . $this->_text->getHashCode()
293 . $this->_width
294 . $this->_height
295 . $this->_marginLeft
296 . $this->_marginTop
297 . ($this->_visible ? 1 : 0)
298 . $this->_fillColor->getHashCode()
299 . $this->_alignment
300 . __CLASS__
301 );
302 }

◆ getHeight()

PHPExcel_Comment::getHeight ( )

Get comment height (CSS style, i.e.

XXpx or YYpt)

Returns
string

Definition at line 180 of file Comment.php.

180 {
181 return $this->_height;
182 }

References $_height.

◆ getMarginLeft()

PHPExcel_Comment::getMarginLeft ( )

Get left margin (CSS style, i.e.

XXpx or YYpt)

Returns
string

Definition at line 200 of file Comment.php.

200 {
201 return $this->_marginLeft;
202 }

References $_marginLeft.

◆ getMarginTop()

PHPExcel_Comment::getMarginTop ( )

Get top margin (CSS style, i.e.

XXpx or YYpt)

Returns
string

Definition at line 220 of file Comment.php.

220 {
221 return $this->_marginTop;
222 }

References $_marginTop.

◆ getText()

PHPExcel_Comment::getText ( )

Get Rich text comment.

Returns
PHPExcel_RichText

Definition at line 140 of file Comment.php.

140 {
141 return $this->_text;
142 }

References $_text.

◆ getVisible()

PHPExcel_Comment::getVisible ( )

Is the comment visible by default?

Returns
boolean

Definition at line 240 of file Comment.php.

240 {
241 return $this->_visible;
242 }

References $_visible.

◆ getWidth()

PHPExcel_Comment::getWidth ( )

Get comment width (CSS style, i.e.

XXpx or YYpt)

Returns
string

Definition at line 160 of file Comment.php.

160 {
161 return $this->_width;
162 }

References $_width.

◆ setAlignment()

PHPExcel_Comment::setAlignment (   $pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL)

Set Alignment.

Parameters
string$pValue
Returns
PHPExcel_Comment

Definition at line 270 of file Comment.php.

270 {
271 $this->_alignment = $pValue;
272 return $this;
273 }

◆ setAuthor()

PHPExcel_Comment::setAuthor (   $pValue = '')

Set Author.

Parameters
string$pValue
Returns
PHPExcel_Comment

Definition at line 130 of file Comment.php.

130 {
131 $this->_author = $pValue;
132 return $this;
133 }

◆ setHeight()

PHPExcel_Comment::setHeight (   $value = '55.5pt')

Set comment height (CSS style, i.e.

XXpx or YYpt)

Parameters
string$value
Returns
PHPExcel_Comment

Definition at line 190 of file Comment.php.

190 {
191 $this->_height = $value;
192 return $this;
193 }

◆ setMarginLeft()

PHPExcel_Comment::setMarginLeft (   $value = '59.25pt')

Set left margin (CSS style, i.e.

XXpx or YYpt)

Parameters
string$value
Returns
PHPExcel_Comment

Definition at line 210 of file Comment.php.

210 {
211 $this->_marginLeft = $value;
212 return $this;
213 }

◆ setMarginTop()

PHPExcel_Comment::setMarginTop (   $value = '1.5pt')

Set top margin (CSS style, i.e.

XXpx or YYpt)

Parameters
string$value
Returns
PHPExcel_Comment

Definition at line 230 of file Comment.php.

230 {
231 $this->_marginTop = $value;
232 return $this;
233 }

◆ setText()

PHPExcel_Comment::setText ( PHPExcel_RichText  $pValue)

Set Rich text comment.

Parameters
PHPExcel_RichText$pValue
Returns
PHPExcel_Comment

Definition at line 150 of file Comment.php.

150 {
151 $this->_text = $pValue;
152 return $this;
153 }

◆ setVisible()

PHPExcel_Comment::setVisible (   $value = false)

Set comment default visibility.

Parameters
boolean$value
Returns
PHPExcel_Comment

Definition at line 250 of file Comment.php.

250 {
251 $this->_visible = $value;
252 return $this;
253 }

◆ setWidth()

PHPExcel_Comment::setWidth (   $value = '96pt')

Set comment width (CSS style, i.e.

XXpx or YYpt)

Parameters
string$value
Returns
PHPExcel_Comment

Definition at line 170 of file Comment.php.

170 {
171 $this->_width = $value;
172 return $this;
173 }

Field Documentation

◆ $_alignment

PHPExcel_Comment::$_alignment
private

Definition at line 99 of file Comment.php.

Referenced by getAlignment().

◆ $_author

PHPExcel_Comment::$_author
private

Definition at line 43 of file Comment.php.

Referenced by getAuthor().

◆ $_fillColor

PHPExcel_Comment::$_fillColor
private

Definition at line 92 of file Comment.php.

Referenced by getFillColor().

◆ $_height

PHPExcel_Comment::$_height = '55.5pt'
private

Definition at line 85 of file Comment.php.

Referenced by getHeight().

◆ $_marginLeft

PHPExcel_Comment::$_marginLeft = '59.25pt'
private

Definition at line 64 of file Comment.php.

Referenced by getMarginLeft().

◆ $_marginTop

PHPExcel_Comment::$_marginTop = '1.5pt'
private

Definition at line 71 of file Comment.php.

Referenced by getMarginTop().

◆ $_text

PHPExcel_Comment::$_text
private

Definition at line 50 of file Comment.php.

Referenced by getText().

◆ $_visible

PHPExcel_Comment::$_visible = false
private

Definition at line 78 of file Comment.php.

Referenced by getVisible().

◆ $_width

PHPExcel_Comment::$_width = '96pt'
private

Definition at line 57 of file Comment.php.

Referenced by getWidth().


The documentation for this class was generated from the following file: