ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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. More...
 
 getFilename ()
 Get Filename. More...
 
 getIndexedFilename ()
 Get indexed filename (using image index) More...
 
 getExtension ()
 Get Extension. More...
 
 getPath ()
 Get Path. More...
 
 setPath ($pValue='', $pVerifyFile=true)
 Set Path. More...
 
 getHashCode ()
 Get hash code. More...
 
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy. More...
 
- Public Member Functions inherited from PHPExcel_Worksheet_BaseDrawing
 __construct ()
 Create a new PHPExcel_Worksheet_BaseDrawing. More...
 
 getImageIndex ()
 Get image index. More...
 
 getName ()
 Get Name. More...
 
 setName ($pValue='')
 Set Name. More...
 
 getDescription ()
 Get Description. More...
 
 setDescription ($pValue='')
 Set Description. More...
 
 getWorksheet ()
 Get Worksheet. More...
 
 setWorksheet (PHPExcel_Worksheet $pValue=null, $pOverrideOld=false)
 Set Worksheet. More...
 
 getCoordinates ()
 Get Coordinates. More...
 
 setCoordinates ($pValue='A1')
 Set Coordinates. More...
 
 getOffsetX ()
 Get OffsetX. More...
 
 setOffsetX ($pValue=0)
 Set OffsetX. More...
 
 getOffsetY ()
 Get OffsetY. More...
 
 setOffsetY ($pValue=0)
 Set OffsetY. More...
 
 getWidth ()
 Get Width. More...
 
 setWidth ($pValue=0)
 Set Width. More...
 
 getHeight ()
 Get Height. More...
 
 setHeight ($pValue=0)
 Set Height. More...
 
 setWidthAndHeight ($width=0, $height=0)
 Set width and height with proportional resize Example: $objDrawing->setResizeProportional(true); $objDrawing->setWidthAndHeight(160,120); More...
 
 getResizeProportional ()
 Get ResizeProportional. More...
 
 setResizeProportional ($pValue=true)
 Set ResizeProportional. More...
 
 getRotation ()
 Get Rotation. More...
 
 setRotation ($pValue=0)
 Set Rotation. More...
 
 getShadow ()
 Get Shadow. More...
 
 setShadow (PHPExcel_Worksheet_Drawing_Shadow $pValue=null)
 Set Shadow. More...
 
 getHashCode ()
 Get hash code. More...
 
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy. More...
 

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

◆ __construct()

PHPExcel_Worksheet_Drawing::__construct ( )

Create a new PHPExcel_Worksheet_Drawing.

Definition at line 48 of file Drawing.php.

49  {
50  // Initialise values
51  $this->_path = '';
52 
53  // Initialize parent
54  parent::__construct();
55  }

Member Function Documentation

◆ __clone()

PHPExcel_Worksheet_Drawing::__clone ( )

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

Definition at line 138 of file Drawing.php.

References $key.

138  {
139  $vars = get_object_vars($this);
140  foreach ($vars as $key => $value) {
141  if (is_object($value)) {
142  $this->$key = clone $value;
143  } else {
144  $this->$key = $value;
145  }
146  }
147  }
$key
Definition: croninfo.php:18

◆ getExtension()

PHPExcel_Worksheet_Drawing::getExtension ( )

Get Extension.

Returns
string

Definition at line 82 of file Drawing.php.

Referenced by getIndexedFilename().

82  {
83  $exploded = explode(".", basename($this->_path));
84  return $exploded[count($exploded) - 1];
85  }
+ Here is the caller graph for this function:

◆ getFilename()

PHPExcel_Worksheet_Drawing::getFilename ( )

Get Filename.

Returns
string

Definition at line 62 of file Drawing.php.

Referenced by getIndexedFilename().

62  {
63  return basename($this->_path);
64  }
+ Here is the caller graph for this function:

◆ getHashCode()

PHPExcel_Worksheet_Drawing::getHashCode ( )

Get hash code.

Returns
string Hash code

Implements PHPExcel_IComparable.

Definition at line 127 of file Drawing.php.

127  {
128  return md5(
129  $this->_path
130  . parent::getHashCode()
131  . __CLASS__
132  );
133  }

◆ getIndexedFilename()

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().

71  {
72  $fileName = $this->getFilename();
73  $fileName = str_replace(' ', '_', $fileName);
74  return str_replace('.' . $this->getExtension(), '', $fileName) . $this->getImageIndex() . '.' . $this->getExtension();
75  }
getExtension()
Get Extension.
Definition: Drawing.php:82
getImageIndex()
Get image index.
getFilename()
Get Filename.
Definition: Drawing.php:62
+ Here is the call graph for this function:

◆ getPath()

PHPExcel_Worksheet_Drawing::getPath ( )

Get Path.

Returns
string

Definition at line 92 of file Drawing.php.

References $_path.

92  {
93  return $this->_path;
94  }

◆ setPath()

PHPExcel_Worksheet_Drawing::setPath (   $pValue = '',
  $pVerifyFile = true 
)

Set Path.

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

Definition at line 104 of file Drawing.php.

104  {
105  if ($pVerifyFile) {
106  if (file_exists($pValue)) {
107  $this->_path = $pValue;
108 
109  if ($this->_width == 0 && $this->_height == 0) {
110  // Get width/height
111  list($this->_width, $this->_height) = getimagesize($pValue);
112  }
113  } else {
114  throw new PHPExcel_Exception("File $pValue not found!");
115  }
116  } else {
117  $this->_path = $pValue;
118  }
119  return $this;
120  }

Field Documentation

◆ $_path

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: