Properties

$name

$name : string

Name.

Type

string

$description

$description : string

Description.

Type

string

$worksheet

$worksheet : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

Worksheet.

Type

Worksheet

$coordinates

$coordinates : string

Coordinates.

Type

string

$offsetX

$offsetX : int

Offset X.

Type

int

$offsetY

$offsetY : int

Offset Y.

Type

int

$width

$width : int

Width.

Type

int

$height

$height : int

Height.

Type

int

$resizeProportional

$resizeProportional : bool

Proportional resize.

Type

bool

$rotation

$rotation : int

Rotation.

Type

int

$shadow

$shadow : \PhpOffice\PhpSpreadsheet\Worksheet\Drawing\Shadow

Shadow.

Type

Shadow

$path

$path : string

Path.

Type

string

$imageCounter

$imageCounter : int

Image counter.

Type

int

$imageIndex

$imageIndex : int

Image index.

Type

int

$hyperlink

$hyperlink : null|\PhpOffice\PhpSpreadsheet\Cell\Hyperlink

Image hyperlink.

Type

Hyperlink

Methods

__construct()

__construct() : mixed

Create a new BaseDrawing.

Returns

mixed —

getFilename()

getFilename() : string

Get Filename.

Returns

string —

getIndexedFilename()

getIndexedFilename() : string

Get indexed filename (using image index).

Returns

string —

getExtension()

getExtension() : string

Get Extension.

Returns

string —

getPath()

getPath() : string

Get Path.

Returns

string —

setPath()

setPath(string  $pValue, bool  $pVerifyFile = true) : $this

Set Path.

Parameters

string $pValue

File path

bool $pVerifyFile

Verify file

Returns

$this —

getHashCode()

getHashCode() : string

Get hash code.

Returns

string —

Hash code

getImageIndex()

getImageIndex() : int

Get image index.

Returns

int —

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, bool  $pOverrideOld = false) : $this

Set Worksheet.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pValue
bool $pOverrideOld

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

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() : int

Get OffsetX.

Returns

int —

setOffsetX()

setOffsetX(int  $pValue) : $this

Set OffsetX.

Parameters

int $pValue

Returns

$this —

getOffsetY()

getOffsetY() : int

Get OffsetY.

Returns

int —

setOffsetY()

setOffsetY(int  $pValue) : $this

Set OffsetY.

Parameters

int $pValue

Returns

$this —

getWidth()

getWidth() : int

Get Width.

Returns

int —

setWidth()

setWidth(int  $pValue) : $this

Set Width.

Parameters

int $pValue

Returns

$this —

getHeight()

getHeight() : int

Get Height.

Returns

int —

setHeight()

setHeight(int  $pValue) : $this

Set Height.

Parameters

int $pValue

Returns

$this —

setWidthAndHeight()

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

Set width and height with proportional resize.

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

Parameters

int $width
int $height

Returns

$this —

getResizeProportional()

getResizeProportional() : bool

Get ResizeProportional.

Returns

bool —

setResizeProportional()

setResizeProportional(bool  $pValue) : $this

Set ResizeProportional.

Parameters

bool $pValue

Returns

$this —

getRotation()

getRotation() : int

Get Rotation.

Returns

int —

setRotation()

setRotation(int  $pValue) : $this

Set Rotation.

Parameters

int $pValue

Returns

$this —

getShadow()

getShadow() : \PhpOffice\PhpSpreadsheet\Worksheet\Drawing\Shadow

Get Shadow.

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\Drawing\Shadow —

setShadow()

setShadow(\PhpOffice\PhpSpreadsheet\Worksheet\Drawing\Shadow  $pValue = null) : $this

Set Shadow.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Drawing\Shadow $pValue

Returns

$this —

__clone()

__clone() : mixed

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

Returns

mixed —

setHyperlink()

setHyperlink(?\PhpOffice\PhpSpreadsheet\Cell\Hyperlink  $pHyperlink = null) : void

Parameters

?\PhpOffice\PhpSpreadsheet\Cell\Hyperlink $pHyperlink

getHyperlink()

getHyperlink() : null|\PhpOffice\PhpSpreadsheet\Cell\Hyperlink

Returns

null|\PhpOffice\PhpSpreadsheet\Cell\Hyperlink —