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));
90 parent::__construct();
109 $this->_imageResource = $value;
111 if (!is_null($this->_imageResource)) {
113 $this->_width = imagesx($this->_imageResource);
114 $this->_height = imagesy($this->_imageResource);
135 $this->_renderingFunction = $value;
155 $this->_mimeType = $value;
166 $extension = explode(
'/', $extension);
167 $extension = $extension[1];
169 return $this->_uniqueName . $this->
getImageIndex() .
'.' . $extension;
179 $this->_renderingFunction
182 . parent::getHashCode()
191 $vars = get_object_vars($this);
192 foreach ($vars as $key => $value) {
193 if (is_object($value)) {
194 $this->$key = clone $value;
196 $this->$key = $value;
getHashCode()
Get hash code.
setMimeType($value=PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT)
Set mime type.
setImageResource($value=null)
Set image resource.
getIndexedFilename()
Get indexed filename (using image index)
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
getImageIndex()
Get image index.
getMimeType()
Get mime type.
getRenderingFunction()
Get rendering function.
__construct()
Create a new PHPExcel_Worksheet_MemoryDrawing.
setRenderingFunction($value=PHPExcel_Worksheet_MemoryDrawing::RENDERING_DEFAULT)
Set rendering function.
getImageResource()
Get image resource.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.