ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
PHPExcel_Worksheet_Drawing Class Reference
+ Inheritance diagram for PHPExcel_Worksheet_Drawing:
+ Collaboration diagram for PHPExcel_Worksheet_Drawing:

Public Member Functions

 __construct ()
 Create a new PHPExcel_Worksheet_Drawing.
 getFilename ()
 Get Filename.
 getIndexedFilename ()
 Get indexed filename (using image index)
 getExtension ()
 Get Extension.
 getPath ()
 Get Path.
 setPath ($pValue= '', $pVerifyFile=true)
 Set Path.
 getHashCode ()
 Get hash code.
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy.
- Public Member Functions inherited from PHPExcel_Worksheet_BaseDrawing
 getImageIndex ()
 Get image index.
 getName ()
 Get Name.
 setName ($pValue= '')
 Set Name.
 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.
 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.
 getRotation ()
 Get Rotation.
 setRotation ($pValue=0)
 Set Rotation.
 getShadow ()
 Get Shadow.
 setShadow (PHPExcel_Worksheet_Drawing_Shadow $pValue=null)
 Set Shadow.

Private Attributes

 $_path

Additional Inherited Members

- Protected Attributes inherited from PHPExcel_Worksheet_BaseDrawing
 $_name
 $_description
 $_worksheet
 $_coordinates
 $_offsetX
 $_offsetY
 $_width
 $_height
 $_resizeProportional
 $_rotation
 $_shadow

Detailed Description

Definition at line 36 of file Drawing.php.

Constructor & Destructor Documentation

PHPExcel_Worksheet_Drawing::__construct ( )

Create a new PHPExcel_Worksheet_Drawing.

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Reimplemented in PHPExcel_Worksheet_HeaderFooterDrawing.

Definition at line 48 of file Drawing.php.

{
// Initialise values
$this->_path = '';
// Initialize parent
}

Member Function Documentation

PHPExcel_Worksheet_Drawing::__clone ( )

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

Reimplemented from PHPExcel_Worksheet_BaseDrawing.

Reimplemented in PHPExcel_Worksheet_HeaderFooterDrawing.

Definition at line 138 of file Drawing.php.

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

Get Extension.

Returns
string

Reimplemented in PHPExcel_Worksheet_HeaderFooterDrawing.

Definition at line 82 of file Drawing.php.

Referenced by getIndexedFilename().

{
$exploded = explode(".", basename($this->_path));
return $exploded[count($exploded) - 1];
}

+ Here is the caller graph for this function:

PHPExcel_Worksheet_Drawing::getFilename ( )

Get Filename.

Returns
string

Reimplemented in PHPExcel_Worksheet_HeaderFooterDrawing.

Definition at line 62 of file Drawing.php.

Referenced by getIndexedFilename().

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

+ Here is the caller graph for this function:

PHPExcel_Worksheet_Drawing::getHashCode ( )

Get hash code.

Returns
string Hash code

Implements PHPExcel_IComparable.

Reimplemented in PHPExcel_Worksheet_HeaderFooterDrawing.

Definition at line 127 of file Drawing.php.

{
return md5(
$this->_path
. parent::getHashCode()
. __CLASS__
);
}
PHPExcel_Worksheet_Drawing::getIndexedFilename ( )

Get indexed filename (using image index)

Returns
string

Definition at line 71 of file Drawing.php.

References getExtension(), getFilename(), and PHPExcel_Worksheet_BaseDrawing\getImageIndex().

{
$fileName = $this->getFilename();
$fileName = str_replace(' ', '_', $fileName);
return str_replace('.' . $this->getExtension(), '', $fileName) . $this->getImageIndex() . '.' . $this->getExtension();
}

+ Here is the call graph for this function:

PHPExcel_Worksheet_Drawing::getPath ( )

Get Path.

Returns
string

Reimplemented in PHPExcel_Worksheet_HeaderFooterDrawing.

Definition at line 92 of file Drawing.php.

References $_path.

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

Set Path.

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

Reimplemented in PHPExcel_Worksheet_HeaderFooterDrawing.

Definition at line 104 of file Drawing.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;
}

Field Documentation

PHPExcel_Worksheet_Drawing::$_path
private

Definition at line 43 of file Drawing.php.

Referenced by getPath().


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