Properties

$name

$name : string

Name.

Type

string

$description

$description : string

Description.

Type

string

$worksheet

$worksheet : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

Worksheet.

Type

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

$coordinates

$coordinates : string

Coordinates.

Type

string

$offsetX

$offsetX : integer

Offset X.

Type

integer

$offsetY

$offsetY : integer

Offset Y.

Type

integer

$width

$width : integer

Width.

Type

integer

$height

$height : integer

Height.

Type

integer

$resizeProportional

$resizeProportional : boolean

Proportional resize.

Type

boolean

$rotation

$rotation : integer

Rotation.

Type

integer

$imageCounter

$imageCounter : integer

Image counter.

Type

integer

$imageIndex

$imageIndex : integer

Image index.

Type

integer

Methods

__construct()

__construct() 

Create a new BaseDrawing.

getImageIndex()

getImageIndex() : integer

Get image index.

Returns

integer

getName()

getName() : string

Get Name.

Returns

string

setName()

setName(string  $pValue) : $this

Set Name.

Parameters

string $pValue

Returns

$this

getDescription()

getDescription() : string

Get Description.

Returns

string

setDescription()

setDescription(string  $description) : $this

Set Description.

Parameters

string $description

Returns

$this

getWorksheet()

getWorksheet() : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

Get Worksheet.

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

setWorksheet()

setWorksheet(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pValue = null, boolean  $pOverrideOld = false) : $this

Set Worksheet.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pValue
boolean $pOverrideOld

If a Worksheet has already been assigned, overwrite it and remove image from old Worksheet?

Throws

\PhpOffice\PhpSpreadsheet\Exception

Returns

$this

getCoordinates()

getCoordinates() : string

Get Coordinates.

Returns

string

setCoordinates()

setCoordinates(string  $pValue) : $this

Set Coordinates.

Parameters

string $pValue

eg: 'A1'

Returns

$this

getOffsetX()

getOffsetX() : integer

Get OffsetX.

Returns

integer

setOffsetX()

setOffsetX(integer  $pValue) : $this

Set OffsetX.

Parameters

integer $pValue

Returns

$this

getOffsetY()

getOffsetY() : integer

Get OffsetY.

Returns

integer

setOffsetY()

setOffsetY(integer  $pValue) : $this

Set OffsetY.

Parameters

integer $pValue

Returns

$this

getWidth()

getWidth() : integer

Get Width.

Returns

integer

setWidth()

setWidth(integer  $pValue) : $this

Set Width.

Parameters

integer $pValue

Returns

$this

getHeight()

getHeight() : integer

Get Height.

Returns

integer

setHeight()

setHeight(integer  $pValue) : $this

Set Height.

Parameters

integer $pValue

Returns

$this

setWidthAndHeight()

setWidthAndHeight(integer  $width, integer  $height) : $this

Set width and height with proportional resize.

Example: $objDrawing->setResizeProportional(true); $objDrawing->setWidthAndHeight(160,120);

Parameters

integer $width
integer $height

Returns

$this

getResizeProportional()

getResizeProportional() : boolean

Get ResizeProportional.

Returns

boolean

setResizeProportional()

setResizeProportional(boolean  $pValue) : $this

Set ResizeProportional.

Parameters

boolean $pValue

Returns

$this

getRotation()

getRotation() : integer

Get Rotation.

Returns

integer

setRotation()

setRotation(integer  $pValue) : $this

Set Rotation.

Parameters

integer $pValue

Returns

$this

getHashCode()

getHashCode() : string

Get hash code.

Returns

string —

Hash code

__clone()

__clone() 

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