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

Public Member Functions

 __construct ()
 Create a new PHPExcel_Worksheet_MemoryDrawing. More...
 
 getImageResource ()
 Get image resource. More...
 
 setImageResource ($value=null)
 Set image resource. More...
 
 getRenderingFunction ()
 Get rendering function. More...
 
 setRenderingFunction ($value=PHPExcel_Worksheet_MemoryDrawing::RENDERING_DEFAULT)
 Set rendering function. More...
 
 getMimeType ()
 Get mime type. More...
 
 setMimeType ($value=PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT)
 Set mime type. More...
 
 getIndexedFilename ()
 Get indexed filename (using image index) 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...
 

Data Fields

const RENDERING_DEFAULT = 'imagepng'
 
const RENDERING_PNG = 'imagepng'
 
const RENDERING_GIF = 'imagegif'
 
const RENDERING_JPEG = 'imagejpeg'
 
const MIMETYPE_DEFAULT = 'image/png'
 
const MIMETYPE_PNG = 'image/png'
 
const MIMETYPE_GIF = 'image/gif'
 
const MIMETYPE_JPEG = 'image/jpeg'
 

Private Attributes

 $_imageResource
 
 $_renderingFunction
 
 $_mimeType
 
 $_uniqueName
 

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 MemoryDrawing.php.

Constructor & Destructor Documentation

◆ __construct()

PHPExcel_Worksheet_MemoryDrawing::__construct ( )

Create a new PHPExcel_Worksheet_MemoryDrawing.

Definition at line 81 of file MemoryDrawing.php.

References time.

82  {
83  // Initialise values
84  $this->_imageResource = null;
85  $this->_renderingFunction = self::RENDERING_DEFAULT;
86  $this->_mimeType = self::MIMETYPE_DEFAULT;
87  $this->_uniqueName = md5(rand(0, 9999). time() . rand(0, 9999));
88 
89  // Initialize parent
90  parent::__construct();
91  }
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.

Member Function Documentation

◆ __clone()

PHPExcel_Worksheet_MemoryDrawing::__clone ( )

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

Definition at line 190 of file MemoryDrawing.php.

References $key.

190  {
191  $vars = get_object_vars($this);
192  foreach ($vars as $key => $value) {
193  if (is_object($value)) {
194  $this->$key = clone $value;
195  } else {
196  $this->$key = $value;
197  }
198  }
199  }
$key
Definition: croninfo.php:18

◆ getHashCode()

PHPExcel_Worksheet_MemoryDrawing::getHashCode ( )

Get hash code.

Returns
string Hash code

Implements PHPExcel_IComparable.

Definition at line 177 of file MemoryDrawing.php.

177  {
178  return md5(
179  $this->_renderingFunction
180  . $this->_mimeType
181  . $this->_uniqueName
182  . parent::getHashCode()
183  . __CLASS__
184  );
185  }

◆ getImageResource()

PHPExcel_Worksheet_MemoryDrawing::getImageResource ( )

Get image resource.

Returns
resource

Definition at line 98 of file MemoryDrawing.php.

References $_imageResource.

◆ getIndexedFilename()

PHPExcel_Worksheet_MemoryDrawing::getIndexedFilename ( )

Get indexed filename (using image index)

Returns
string

Definition at line 164 of file MemoryDrawing.php.

References PHPExcel_Worksheet_BaseDrawing\getImageIndex(), and getMimeType().

164  {
165  $extension = strtolower($this->getMimeType());
166  $extension = explode('/', $extension);
167  $extension = $extension[1];
168 
169  return $this->_uniqueName . $this->getImageIndex() . '.' . $extension;
170  }
getImageIndex()
Get image index.
+ Here is the call graph for this function:

◆ getMimeType()

PHPExcel_Worksheet_MemoryDrawing::getMimeType ( )

Get mime type.

Returns
string

Definition at line 144 of file MemoryDrawing.php.

References $_mimeType.

Referenced by getIndexedFilename().

144  {
145  return $this->_mimeType;
146  }
+ Here is the caller graph for this function:

◆ getRenderingFunction()

PHPExcel_Worksheet_MemoryDrawing::getRenderingFunction ( )

Get rendering function.

Returns
string

Definition at line 124 of file MemoryDrawing.php.

References $_renderingFunction.

◆ setImageResource()

PHPExcel_Worksheet_MemoryDrawing::setImageResource (   $value = null)

Set image resource.

Parameters
$valueresource
Returns
PHPExcel_Worksheet_MemoryDrawing

Definition at line 108 of file MemoryDrawing.php.

108  {
109  $this->_imageResource = $value;
110 
111  if (!is_null($this->_imageResource)) {
112  // Get width/height
113  $this->_width = imagesx($this->_imageResource);
114  $this->_height = imagesy($this->_imageResource);
115  }
116  return $this;
117  }

◆ setMimeType()

PHPExcel_Worksheet_MemoryDrawing::setMimeType (   $value = PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT)

Set mime type.

Parameters
string$value
Returns
PHPExcel_Worksheet_MemoryDrawing

Definition at line 154 of file MemoryDrawing.php.

154  {
155  $this->_mimeType = $value;
156  return $this;
157  }

◆ setRenderingFunction()

PHPExcel_Worksheet_MemoryDrawing::setRenderingFunction (   $value = PHPExcel_Worksheet_MemoryDrawing::RENDERING_DEFAULT)

Set rendering function.

Parameters
string$value
Returns
PHPExcel_Worksheet_MemoryDrawing

Definition at line 134 of file MemoryDrawing.php.

134  {
135  $this->_renderingFunction = $value;
136  return $this;
137  }

Field Documentation

◆ $_imageResource

PHPExcel_Worksheet_MemoryDrawing::$_imageResource
private

Definition at line 55 of file MemoryDrawing.php.

Referenced by getImageResource().

◆ $_mimeType

PHPExcel_Worksheet_MemoryDrawing::$_mimeType
private

Definition at line 69 of file MemoryDrawing.php.

Referenced by getMimeType().

◆ $_renderingFunction

PHPExcel_Worksheet_MemoryDrawing::$_renderingFunction
private

Definition at line 62 of file MemoryDrawing.php.

Referenced by getRenderingFunction().

◆ $_uniqueName

PHPExcel_Worksheet_MemoryDrawing::$_uniqueName
private

Definition at line 76 of file MemoryDrawing.php.

◆ MIMETYPE_DEFAULT

const PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT = 'image/png'

Definition at line 45 of file MemoryDrawing.php.

◆ MIMETYPE_GIF

const PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_GIF = 'image/gif'

Definition at line 47 of file MemoryDrawing.php.

◆ MIMETYPE_JPEG

const PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_JPEG = 'image/jpeg'

Definition at line 48 of file MemoryDrawing.php.

Referenced by PHPExcel_Reader_Excel5\load().

◆ MIMETYPE_PNG

const PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_PNG = 'image/png'

Definition at line 46 of file MemoryDrawing.php.

Referenced by PHPExcel_Reader_Excel5\load().

◆ RENDERING_DEFAULT

const PHPExcel_Worksheet_MemoryDrawing::RENDERING_DEFAULT = 'imagepng'

Definition at line 39 of file MemoryDrawing.php.

Referenced by PHPExcel_Writer_Excel5\_buildWorkbookEscher().

◆ RENDERING_GIF

const PHPExcel_Worksheet_MemoryDrawing::RENDERING_GIF = 'imagegif'

Definition at line 41 of file MemoryDrawing.php.

Referenced by PHPExcel_Writer_Excel5\_buildWorkbookEscher().

◆ RENDERING_JPEG

const PHPExcel_Worksheet_MemoryDrawing::RENDERING_JPEG = 'imagejpeg'

◆ RENDERING_PNG

const PHPExcel_Worksheet_MemoryDrawing::RENDERING_PNG = 'imagepng'

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