Constants

ALGORITHM_MD2

ALGORITHM_MD2 = 'MD2'

ALGORITHM_MD4

ALGORITHM_MD4 = 'MD4'

ALGORITHM_MD5

ALGORITHM_MD5 = 'MD5'

ALGORITHM_SHA_1

ALGORITHM_SHA_1 = 'SHA-1'

ALGORITHM_SHA_256

ALGORITHM_SHA_256 = 'SHA-256'

ALGORITHM_SHA_384

ALGORITHM_SHA_384 = 'SHA-384'

ALGORITHM_SHA_512

ALGORITHM_SHA_512 = 'SHA-512'

ALGORITHM_RIPEMD_128

ALGORITHM_RIPEMD_128 = 'RIPEMD-128'

ALGORITHM_RIPEMD_160

ALGORITHM_RIPEMD_160 = 'RIPEMD-160'

ALGORITHM_WHIRLPOOL

ALGORITHM_WHIRLPOOL = 'WHIRLPOOL'

Properties

$sheet

$sheet : bool

Sheet.

Type

bool

$objects

$objects : bool

Objects.

Type

bool

$scenarios

$scenarios : bool

Scenarios.

Type

bool

$formatCells

$formatCells : bool

Format cells.

Type

bool

$formatColumns

$formatColumns : bool

Format columns.

Type

bool

$formatRows

$formatRows : bool

Format rows.

Type

bool

$insertColumns

$insertColumns : bool

Insert columns.

Type

bool

$insertRows

$insertRows : bool

Insert rows.

Type

bool

$insertHyperlinks

$insertHyperlinks : bool

Insert hyperlinks.

Type

bool

$deleteColumns

$deleteColumns : bool

Delete columns.

Type

bool

$deleteRows

$deleteRows : bool

Delete rows.

Type

bool

$selectLockedCells

$selectLockedCells : bool

Select locked cells.

Type

bool

$sort

$sort : bool

Sort.

Type

bool

$autoFilter

$autoFilter : bool

AutoFilter.

Type

bool

$pivotTables

$pivotTables : bool

Pivot tables.

Type

bool

$selectUnlockedCells

$selectUnlockedCells : bool

Select unlocked cells.

Type

bool

$password

$password : string

Hashed password.

Type

string

$algorithm

$algorithm : string

Algorithm name.

Type

string

$salt

$salt : string

Salt value.

Type

string

$spinCount

$spinCount : int

Spin count.

Type

int

Methods

__construct()

__construct() : mixed

Create a new Protection.

Returns

mixed —

isProtectionEnabled()

isProtectionEnabled() : bool

Is some sort of protection enabled?

Returns

bool —

getSheet()

getSheet() : bool

Get Sheet.

Returns

bool —

setSheet()

setSheet(bool  $pValue) : $this

Set Sheet.

Parameters

bool $pValue

Returns

$this —

getObjects()

getObjects() : bool

Get Objects.

Returns

bool —

setObjects()

setObjects(bool  $pValue) : $this

Set Objects.

Parameters

bool $pValue

Returns

$this —

getScenarios()

getScenarios() : bool

Get Scenarios.

Returns

bool —

setScenarios()

setScenarios(bool  $pValue) : $this

Set Scenarios.

Parameters

bool $pValue

Returns

$this —

getFormatCells()

getFormatCells() : bool

Get FormatCells.

Returns

bool —

setFormatCells()

setFormatCells(bool  $pValue) : $this

Set FormatCells.

Parameters

bool $pValue

Returns

$this —

getFormatColumns()

getFormatColumns() : bool

Get FormatColumns.

Returns

bool —

setFormatColumns()

setFormatColumns(bool  $pValue) : $this

Set FormatColumns.

Parameters

bool $pValue

Returns

$this —

getFormatRows()

getFormatRows() : bool

Get FormatRows.

Returns

bool —

setFormatRows()

setFormatRows(bool  $pValue) : $this

Set FormatRows.

Parameters

bool $pValue

Returns

$this —

getInsertColumns()

getInsertColumns() : bool

Get InsertColumns.

Returns

bool —

setInsertColumns()

setInsertColumns(bool  $pValue) : $this

Set InsertColumns.

Parameters

bool $pValue

Returns

$this —

getInsertRows()

getInsertRows() : bool

Get InsertRows.

Returns

bool —

setInsertRows()

setInsertRows(bool  $pValue) : $this

Set InsertRows.

Parameters

bool $pValue

Returns

$this —

getInsertHyperlinks()

getInsertHyperlinks() : bool

Get InsertHyperlinks.

Returns

bool —

setInsertHyperlinks()

setInsertHyperlinks(bool  $pValue) : $this

Set InsertHyperlinks.

Parameters

bool $pValue

Returns

$this —

getDeleteColumns()

getDeleteColumns() : bool

Get DeleteColumns.

Returns

bool —

setDeleteColumns()

setDeleteColumns(bool  $pValue) : $this

Set DeleteColumns.

Parameters

bool $pValue

Returns

$this —

getDeleteRows()

getDeleteRows() : bool

Get DeleteRows.

Returns

bool —

setDeleteRows()

setDeleteRows(bool  $pValue) : $this

Set DeleteRows.

Parameters

bool $pValue

Returns

$this —

getSelectLockedCells()

getSelectLockedCells() : bool

Get SelectLockedCells.

Returns

bool —

setSelectLockedCells()

setSelectLockedCells(bool  $pValue) : $this

Set SelectLockedCells.

Parameters

bool $pValue

Returns

$this —

getSort()

getSort() : bool

Get Sort.

Returns

bool —

setSort()

setSort(bool  $pValue) : $this

Set Sort.

Parameters

bool $pValue

Returns

$this —

getAutoFilter()

getAutoFilter() : bool

Get AutoFilter.

Returns

bool —

setAutoFilter()

setAutoFilter(bool  $pValue) : $this

Set AutoFilter.

Parameters

bool $pValue

Returns

$this —

getPivotTables()

getPivotTables() : bool

Get PivotTables.

Returns

bool —

setPivotTables()

setPivotTables(bool  $pValue) : $this

Set PivotTables.

Parameters

bool $pValue

Returns

$this —

getSelectUnlockedCells()

getSelectUnlockedCells() : bool

Get SelectUnlockedCells.

Returns

bool —

setSelectUnlockedCells()

setSelectUnlockedCells(bool  $pValue) : $this

Set SelectUnlockedCells.

Parameters

bool $pValue

Returns

$this —

getPassword()

getPassword() : string

Get hashed password.

Returns

string —

setPassword()

setPassword(string  $pValue, bool  $pAlreadyHashed = false) : $this

Set Password.

Parameters

string $pValue
bool $pAlreadyHashed

If the password has already been hashed, set this to true

Returns

$this —

getAlgorithm()

getAlgorithm() : string

Get algorithm name.

Returns

string —

setAlgorithm()

setAlgorithm(string  $algorithm) : void

Set algorithm name.

Parameters

string $algorithm

getSalt()

getSalt() : string

Get salt value.

Returns

string —

setSalt()

setSalt(string  $salt) : void

Set salt value.

Parameters

string $salt

getSpinCount()

getSpinCount() : int

Get spin count.

Returns

int —

setSpinCount()

setSpinCount(int  $spinCount) : void

Set spin count.

Parameters

int $spinCount

verify()

verify(string  $password) : bool

Verify that the given non-hashed password can "unlock" the protection.

Parameters

string $password

Returns

bool —

__clone()

__clone() : mixed

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

Returns

mixed —

generateSalt()

generateSalt() : string

Create a pseudorandom string.

Returns

string —