ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
PHPExcel_Comment Class Reference
+ Inheritance diagram for PHPExcel_Comment:
+ Collaboration diagram for PHPExcel_Comment:

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 54 of file Comment.php.

Constructor & Destructor Documentation

PHPExcel_Comment::__construct ( )

Create a new PHPExcel_Comment.

Exceptions
Exception

Definition at line 117 of file Comment.php.

{
// Initialise variables
$this->_author = 'Author';
$this->_text = new PHPExcel_RichText();
$this->_fillColor = new PHPExcel_Style_Color('FFFFFFE1');
}

Member Function Documentation

PHPExcel_Comment::__clone ( )

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

Definition at line 327 of file Comment.php.

References $key.

{
$vars = get_object_vars($this);
foreach ($vars as $key => $value) {
if (is_object($value)) {
$this->$key = clone $value;
} else {
$this->$key = $value;
}
}
}
PHPExcel_Comment::getAuthor ( )

Get Author.

Returns
string

Definition at line 130 of file Comment.php.

References $_author.

{
}
PHPExcel_Comment::getFillColor ( )

Get fill color.

Returns
PHPExcel_Style_Color

Definition at line 270 of file Comment.php.

References $_fillColor.

{
}
PHPExcel_Comment::getHashCode ( )

Get hash code.

Returns
string Hash code

Implements PHPExcel_IComparable.

Definition at line 279 of file Comment.php.

{
return md5(
$this->_author
. $this->_text->getHashCode()
. $this->_width
. $this->_height
. $this->_marginLeft
. $this->_marginTop
. ($this->_visible ? 1 : 0)
. $this->_fillColor->getHashCode()
. __CLASS__
);
}
PHPExcel_Comment::getHashIndex ( )

Get hash index.

Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.

Returns
string Hash index

Implements PHPExcel_IComparable.

Definition at line 308 of file Comment.php.

References $_hashIndex.

{
}
PHPExcel_Comment::getHeight ( )

Get comment height (CSS style, i.e.

XXpx or YYpt)

Returns
string

Definition at line 190 of file Comment.php.

References $_height.

{
}
PHPExcel_Comment::getMarginLeft ( )

Get left margin (CSS style, i.e.

XXpx or YYpt)

Returns
string

Definition at line 210 of file Comment.php.

References $_marginLeft.

{
}
PHPExcel_Comment::getMarginTop ( )

Get top margin (CSS style, i.e.

XXpx or YYpt)

Returns
string

Definition at line 230 of file Comment.php.

References $_marginTop.

{
}
PHPExcel_Comment::getText ( )

Get Rich text comment.

Returns
PHPExcel_RichText

Definition at line 150 of file Comment.php.

References $_text.

{
return $this->_text;
}
PHPExcel_Comment::getVisible ( )

Is the comment visible by default?

Returns
boolean

Definition at line 250 of file Comment.php.

References $_visible.

{
}
PHPExcel_Comment::getWidth ( )

Get comment width (CSS style, i.e.

XXpx or YYpt)

Returns
string

Definition at line 170 of file Comment.php.

References $_width.

{
return $this->_width;
}
PHPExcel_Comment::setAuthor (   $pValue = '')

Set Author.

Parameters
string$pValue
Returns
PHPExcel_Comment

Definition at line 140 of file Comment.php.

{
$this->_author = $pValue;
return $this;
}
PHPExcel_Comment::setHashIndex (   $value)

Set hash index.

Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.

Parameters
string$valueHash index

Implements PHPExcel_IComparable.

Definition at line 320 of file Comment.php.

{
$this->_hashIndex = $value;
}
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 200 of file Comment.php.

{
$this->_height = $value;
return $this;
}
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 220 of file Comment.php.

{
$this->_marginLeft = $value;
return $this;
}
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 240 of file Comment.php.

{
$this->_marginTop = $value;
return $this;
}
PHPExcel_Comment::setText ( PHPExcel_RichText  $pValue)

Set Rich text comment.

Parameters
PHPExcel_RichText$pValue
Returns
PHPExcel_Comment

Definition at line 160 of file Comment.php.

{
$this->_text = $pValue;
return $this;
}
PHPExcel_Comment::setVisible (   $value = false)

Set comment default visibility.

Parameters
boolean$value
Returns
PHPExcel_Comment

Definition at line 260 of file Comment.php.

{
$this->_visible = $value;
return $this;
}
PHPExcel_Comment::setWidth (   $value = '96pt')

Set comment width (CSS style, i.e.

XXpx or YYpt)

Parameters
string$value
Returns
PHPExcel_Comment

Definition at line 180 of file Comment.php.

{
$this->_width = $value;
return $this;
}

Field Documentation

PHPExcel_Comment::$_author
private

Definition at line 61 of file Comment.php.

Referenced by getAuthor().

PHPExcel_Comment::$_fillColor
private

Definition at line 110 of file Comment.php.

Referenced by getFillColor().

PHPExcel_Comment::$_hashIndex
private

Definition at line 298 of file Comment.php.

Referenced by getHashIndex().

PHPExcel_Comment::$_height = '55.5pt'
private

Definition at line 103 of file Comment.php.

Referenced by getHeight().

PHPExcel_Comment::$_marginLeft = '59.25pt'
private

Definition at line 82 of file Comment.php.

Referenced by getMarginLeft().

PHPExcel_Comment::$_marginTop = '1.5pt'
private

Definition at line 89 of file Comment.php.

Referenced by getMarginTop().

PHPExcel_Comment::$_text
private

Definition at line 68 of file Comment.php.

Referenced by getText().

PHPExcel_Comment::$_visible = false
private

Definition at line 96 of file Comment.php.

Referenced by getVisible().

PHPExcel_Comment::$_width = '96pt'
private

Definition at line 75 of file Comment.php.

Referenced by getWidth().


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