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

Public Member Functions

 __construct ()
 Create a new PHPExcel_Worksheet_HeaderFooterDrawing.
 getName ()
 Get Name.
 setName ($pValue= '')
 Set Name.
 getOffsetX ()
 Get OffsetX.
 setOffsetX ($pValue=0)
 Set OffsetX.
 getOffsetY ()
 Get OffsetY.
 setOffsetY ($pValue=0)
 Set OffsetY.
 getWidth ()
 Get Width.
 setWidth ($pValue=0)
 Set Width.
 getHeight ()
 Get Height.
 setHeight ($pValue=0)
 Set Height.
 setWidthAndHeight ($width=0, $height=0)
 Set width and height with proportional resize Example: $objDrawing->setResizeProportional(true); $objDrawing->setWidthAndHeight(160,120);
 getResizeProportional ()
 Get ResizeProportional.
 setResizeProportional ($pValue=true)
 Set ResizeProportional.
 getFilename ()
 Get Filename.
 getExtension ()
 Get Extension.
 getPath ()
 Get Path.
 setPath ($pValue= '', $pVerifyFile=true)
 Set Path.
 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.
- Public Member Functions inherited from PHPExcel_Worksheet_Drawing
 getIndexedFilename ()
 Get indexed filename (using image index)
- Public Member Functions inherited from PHPExcel_Worksheet_BaseDrawing
 getImageIndex ()
 Get image index.
 getDescription ()
 Get Description.
 setDescription ($pValue= '')
 Set Description.
 getWorksheet ()
 Get Worksheet.
 setWorksheet (PHPExcel_Worksheet $pValue=null, $pOverrideOld=false)
 Set Worksheet.
 getCoordinates ()
 Get Coordinates.
 setCoordinates ($pValue= 'A1')
 Set Coordinates.
 getRotation ()
 Get Rotation.
 setRotation ($pValue=0)
 Set Rotation.
 getShadow ()
 Get Shadow.
 setShadow (PHPExcel_Worksheet_Drawing_Shadow $pValue=null)
 Set Shadow.

Protected Attributes

 $_name
 $_offsetX
 $_offsetY
 $_width
 $_height
 $_resizeProportional

Private Attributes

 $_path
 $_hashIndex

Detailed Description

Definition at line 57 of file HeaderFooterDrawing.php.

Constructor & Destructor Documentation

PHPExcel_Worksheet_HeaderFooterDrawing::__construct ( )

Create a new PHPExcel_Worksheet_HeaderFooterDrawing.

Reimplemented from PHPExcel_Worksheet_Drawing.

Definition at line 111 of file HeaderFooterDrawing.php.

{
// Initialise values
$this->_path = '';
$this->_name = '';
$this->_offsetX = 0;
$this->_offsetY = 0;
$this->_width = 0;
$this->_height = 0;
$this->_resizeProportional = true;
}

Member Function Documentation

PHPExcel_Worksheet_HeaderFooterDrawing::__clone ( )

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

Reimplemented from PHPExcel_Worksheet_Drawing.

Definition at line 391 of file HeaderFooterDrawing.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_Worksheet_HeaderFooterDrawing::getExtension ( )

Get Extension.

Returns
string

Reimplemented from PHPExcel_Worksheet_Drawing.

Definition at line 301 of file HeaderFooterDrawing.php.

{
return end(explode(".", basename($this->_path)));
}
PHPExcel_Worksheet_HeaderFooterDrawing::getFilename ( )

Get Filename.

Returns
string

Reimplemented from PHPExcel_Worksheet_Drawing.

Definition at line 292 of file HeaderFooterDrawing.php.

{
return basename($this->_path);
}
PHPExcel_Worksheet_HeaderFooterDrawing::getHashCode ( )

Get hash code.

Returns
string Hash code

Implements PHPExcel_IComparable.

Definition at line 345 of file HeaderFooterDrawing.php.

{
return md5(
$this->_path
. $this->_name
. $this->_offsetX
. $this->_offsetY
. $this->_width
. $this->_height
. __CLASS__
);
}
PHPExcel_Worksheet_HeaderFooterDrawing::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 372 of file HeaderFooterDrawing.php.

References $_hashIndex.

{
}
PHPExcel_Worksheet_HeaderFooterDrawing::getHeight ( )

Get Height.

Returns
int

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 216 of file HeaderFooterDrawing.php.

References $_height.

{
}
PHPExcel_Worksheet_HeaderFooterDrawing::getName ( )

Get Name.

Returns
string

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 128 of file HeaderFooterDrawing.php.

References $_name.

{
return $this->_name;
}
PHPExcel_Worksheet_HeaderFooterDrawing::getOffsetX ( )

Get OffsetX.

Returns
int

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 148 of file HeaderFooterDrawing.php.

References $_offsetX.

{
}
PHPExcel_Worksheet_HeaderFooterDrawing::getOffsetY ( )

Get OffsetY.

Returns
int

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 168 of file HeaderFooterDrawing.php.

References $_offsetY.

{
}
PHPExcel_Worksheet_HeaderFooterDrawing::getPath ( )

Get Path.

Returns
string

Reimplemented from PHPExcel_Worksheet_Drawing.

Definition at line 310 of file HeaderFooterDrawing.php.

References $_path.

{
return $this->_path;
}
PHPExcel_Worksheet_HeaderFooterDrawing::getResizeProportional ( )

Get ResizeProportional.

Returns
boolean

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 272 of file HeaderFooterDrawing.php.

References $_resizeProportional.

PHPExcel_Worksheet_HeaderFooterDrawing::getWidth ( )

Get Width.

Returns
int

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 188 of file HeaderFooterDrawing.php.

References $_width.

{
return $this->_width;
}
PHPExcel_Worksheet_HeaderFooterDrawing::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 384 of file HeaderFooterDrawing.php.

{
$this->_hashIndex = $value;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setHeight (   $pValue = 0)

Set Height.

Parameters
int$pValue
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 226 of file HeaderFooterDrawing.php.

References $_height.

{
// Resize proportional?
if ($this->_resizeProportional && $pValue != 0) {
$ratio = $this->_width / $this->_height;
$this->_width = round($ratio * $pValue);
}
// Set height
$this->_height = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setName (   $pValue = '')

Set Name.

Parameters
string$pValue
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 138 of file HeaderFooterDrawing.php.

{
$this->_name = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setOffsetX (   $pValue = 0)

Set OffsetX.

Parameters
int$pValue
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 158 of file HeaderFooterDrawing.php.

{
$this->_offsetX = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setOffsetY (   $pValue = 0)

Set OffsetY.

Parameters
int$pValue
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 178 of file HeaderFooterDrawing.php.

{
$this->_offsetY = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setPath (   $pValue = '',
  $pVerifyFile = true 
)

Set Path.

Parameters
string$pValueFile path
boolean$pVerifyFileVerify file
Exceptions
Exception
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_Drawing.

Definition at line 322 of file HeaderFooterDrawing.php.

{
if ($pVerifyFile) {
if (file_exists($pValue)) {
$this->_path = $pValue;
if ($this->_width == 0 && $this->_height == 0) {
// Get width/height
list($this->_width, $this->_height) = getimagesize($pValue);
}
} else {
throw new Exception("File $pValue not found!");
}
} else {
$this->_path = $pValue;
}
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setResizeProportional (   $pValue = true)

Set ResizeProportional.

Parameters
boolean$pValue
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 282 of file HeaderFooterDrawing.php.

{
$this->_resizeProportional = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setWidth (   $pValue = 0)

Set Width.

Parameters
int$pValue
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 198 of file HeaderFooterDrawing.php.

References $_height.

{
// Resize proportional?
if ($this->_resizeProportional && $pValue != 0) {
$ratio = $this->_width / $this->_height;
$this->_height = round($ratio * $pValue);
}
// Set width
$this->_width = $pValue;
return $this;
}
PHPExcel_Worksheet_HeaderFooterDrawing::setWidthAndHeight (   $width = 0,
  $height = 0 
)

Set width and height with proportional resize Example: $objDrawing->setResizeProportional(true); $objDrawing->setWidthAndHeight(160,120);

Author
Vincent MSN:kele_.nosp@m.100@.nosp@m.hotma.nosp@m.il.c.nosp@m.om
Parameters
int$width
int$height
Returns
PHPExcel_Worksheet_HeaderFooterDrawing

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Definition at line 252 of file HeaderFooterDrawing.php.

References $_height, and $_width.

{
$xratio = $width / $this->_width;
$yratio = $height / $this->_height;
if ($this->_resizeProportional && !($width == 0 || $height == 0)) {
if (($xratio * $this->_height) < $height) {
$this->_height = ceil($xratio * $this->_height);
$this->_width = $width;
} else {
$this->_width = ceil($yratio * $this->_width);
$this->_height = $height;
}
}
return $this;
}

Field Documentation

PHPExcel_Worksheet_HeaderFooterDrawing::$_hashIndex
private

Definition at line 362 of file HeaderFooterDrawing.php.

Referenced by getHashIndex().

PHPExcel_Worksheet_HeaderFooterDrawing::$_height
protected

Definition at line 99 of file HeaderFooterDrawing.php.

Referenced by getHeight(), setHeight(), setWidth(), and setWidthAndHeight().

PHPExcel_Worksheet_HeaderFooterDrawing::$_name
protected

Definition at line 71 of file HeaderFooterDrawing.php.

Referenced by getName().

PHPExcel_Worksheet_HeaderFooterDrawing::$_offsetX
protected

Definition at line 78 of file HeaderFooterDrawing.php.

Referenced by getOffsetX().

PHPExcel_Worksheet_HeaderFooterDrawing::$_offsetY
protected

Definition at line 85 of file HeaderFooterDrawing.php.

Referenced by getOffsetY().

PHPExcel_Worksheet_HeaderFooterDrawing::$_path
private

Definition at line 64 of file HeaderFooterDrawing.php.

Referenced by getPath().

PHPExcel_Worksheet_HeaderFooterDrawing::$_resizeProportional
protected

Definition at line 106 of file HeaderFooterDrawing.php.

Referenced by getResizeProportional().

PHPExcel_Worksheet_HeaderFooterDrawing::$_width
protected

Definition at line 92 of file HeaderFooterDrawing.php.

Referenced by getWidth(), and setWidthAndHeight().


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