Documentation

Protection

Table of Contents

ALGORITHM_MD2 'MD2'
ALGORITHM_MD4 'MD4'
ALGORITHM_MD5 'MD5'
ALGORITHM_SHA_1 'SHA-1'
ALGORITHM_SHA_256 'SHA-256'
ALGORITHM_SHA_384 'SHA-384'
ALGORITHM_SHA_512 'SHA-512'
ALGORITHM_RIPEMD_128 'RIPEMD-128'
ALGORITHM_RIPEMD_160 'RIPEMD-160'
ALGORITHM_WHIRLPOOL 'WHIRLPOOL'
$sheet Sheet. bool
$objects Objects. bool
$scenarios Scenarios. bool
$formatCells Format cells. bool
$formatColumns Format columns. bool
$formatRows Format rows. bool
$insertColumns Insert columns. bool
$insertRows Insert rows. bool
$insertHyperlinks Insert hyperlinks. bool
$deleteColumns Delete columns. bool
$deleteRows Delete rows. bool
$selectLockedCells Select locked cells. bool
$sort Sort. bool
$autoFilter AutoFilter. bool
$pivotTables Pivot tables. bool
$selectUnlockedCells Select unlocked cells. bool
$password Hashed password. string
$algorithm Algorithm name. string
$salt Salt value. string
$spinCount Spin count. int
__construct() Create a new Protection. mixed
isProtectionEnabled() Is some sort of protection enabled? bool
getSheet() Get Sheet. bool
setSheet() Set Sheet. $this
getObjects() Get Objects. bool
setObjects() Set Objects. $this
getScenarios() Get Scenarios. bool
setScenarios() Set Scenarios. $this
getFormatCells() Get FormatCells. bool
setFormatCells() Set FormatCells. $this
getFormatColumns() Get FormatColumns. bool
setFormatColumns() Set FormatColumns. $this
getFormatRows() Get FormatRows. bool
setFormatRows() Set FormatRows. $this
getInsertColumns() Get InsertColumns. bool
setInsertColumns() Set InsertColumns. $this
getInsertRows() Get InsertRows. bool
setInsertRows() Set InsertRows. $this
getInsertHyperlinks() Get InsertHyperlinks. bool
setInsertHyperlinks() Set InsertHyperlinks. $this
getDeleteColumns() Get DeleteColumns. bool
setDeleteColumns() Set DeleteColumns. $this
getDeleteRows() Get DeleteRows. bool
setDeleteRows() Set DeleteRows. $this
getSelectLockedCells() Get SelectLockedCells. bool
setSelectLockedCells() Set SelectLockedCells. $this
getSort() Get Sort. bool
setSort() Set Sort. $this
getAutoFilter() Get AutoFilter. bool
setAutoFilter() Set AutoFilter. $this
getPivotTables() Get PivotTables. bool
setPivotTables() Set PivotTables. $this
getSelectUnlockedCells() Get SelectUnlockedCells. bool
setSelectUnlockedCells() Set SelectUnlockedCells. $this
getPassword() Get hashed password. string
setPassword() Set Password. $this
generateSalt() Create a pseudorandom string. string
getAlgorithm() Get algorithm name. string
setAlgorithm() Set algorithm name. void
getSalt() Get salt value. string
setSalt() Set salt value. void
getSpinCount() Get spin count. int
setSpinCount() Set spin count. void
verify() Verify that the given non-hashed password can "unlock" the protection. bool
__clone() Implement PHP __clone to create a deep clone, not just a shallow copy. mixed

Constants

ALGORITHM_SHA_1

mixed $ALGORITHM_SHA_1 = 'SHA-1'

ALGORITHM_SHA_256

mixed $ALGORITHM_SHA_256 = 'SHA-256'

ALGORITHM_SHA_384

mixed $ALGORITHM_SHA_384 = 'SHA-384'

ALGORITHM_SHA_512

mixed $ALGORITHM_SHA_512 = 'SHA-512'

ALGORITHM_RIPEMD_128

mixed $ALGORITHM_RIPEMD_128 = 'RIPEMD-128'

ALGORITHM_RIPEMD_160

mixed $ALGORITHM_RIPEMD_160 = 'RIPEMD-160'

ALGORITHM_WHIRLPOOL

mixed $ALGORITHM_WHIRLPOOL = 'WHIRLPOOL'

Properties

$scenarios

Scenarios.

private bool $scenarios = false

$formatCells

Format cells.

private bool $formatCells = false

$formatColumns

Format columns.

private bool $formatColumns = false

$formatRows

Format rows.

private bool $formatRows = false

$insertColumns

Insert columns.

private bool $insertColumns = false

$insertRows

Insert rows.

private bool $insertRows = false

$insertHyperlinks

Insert hyperlinks.

private bool $insertHyperlinks = false

$deleteColumns

Delete columns.

private bool $deleteColumns = false

$deleteRows

Delete rows.

private bool $deleteRows = false

$selectLockedCells

Select locked cells.

private bool $selectLockedCells = false

$autoFilter

AutoFilter.

private bool $autoFilter = false

$pivotTables

Pivot tables.

private bool $pivotTables = false

$selectUnlockedCells

Select unlocked cells.

private bool $selectUnlockedCells = false

$password

Hashed password.

private string $password = ''

$algorithm

Algorithm name.

private string $algorithm = ''

$spinCount

Spin count.

private int $spinCount = 10000

Methods

__construct()

Create a new Protection.

public __construct( ) : mixed
Return values
mixed

isProtectionEnabled()

Is some sort of protection enabled?

public isProtectionEnabled( ) : bool
Return values
bool

getSheet()

Get Sheet.

public getSheet( ) : bool
Return values
bool

setSheet()

Set Sheet.

public setSheet( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getObjects()

Get Objects.

public getObjects( ) : bool
Return values
bool

setObjects()

Set Objects.

public setObjects( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getScenarios()

Get Scenarios.

public getScenarios( ) : bool
Return values
bool

setScenarios()

Set Scenarios.

public setScenarios( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getFormatCells()

Get FormatCells.

public getFormatCells( ) : bool
Return values
bool

setFormatCells()

Set FormatCells.

public setFormatCells( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getFormatColumns()

Get FormatColumns.

public getFormatColumns( ) : bool
Return values
bool

setFormatColumns()

Set FormatColumns.

public setFormatColumns( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getFormatRows()

Get FormatRows.

public getFormatRows( ) : bool
Return values
bool

setFormatRows()

Set FormatRows.

public setFormatRows( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getInsertColumns()

Get InsertColumns.

public getInsertColumns( ) : bool
Return values
bool

setInsertColumns()

Set InsertColumns.

public setInsertColumns( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getInsertRows()

Get InsertRows.

public getInsertRows( ) : bool
Return values
bool

setInsertRows()

Set InsertRows.

public setInsertRows( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getInsertHyperlinks()

Get InsertHyperlinks.

public getInsertHyperlinks( ) : bool
Return values
bool

setInsertHyperlinks()

Set InsertHyperlinks.

public setInsertHyperlinks( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getDeleteColumns()

Get DeleteColumns.

public getDeleteColumns( ) : bool
Return values
bool

setDeleteColumns()

Set DeleteColumns.

public setDeleteColumns( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getDeleteRows()

Get DeleteRows.

public getDeleteRows( ) : bool
Return values
bool

setDeleteRows()

Set DeleteRows.

public setDeleteRows( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getSelectLockedCells()

Get SelectLockedCells.

public getSelectLockedCells( ) : bool
Return values
bool

setSelectLockedCells()

Set SelectLockedCells.

public setSelectLockedCells( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getSort()

Get Sort.

public getSort( ) : bool
Return values
bool

setSort()

Set Sort.

public setSort( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getAutoFilter()

Get AutoFilter.

public getAutoFilter( ) : bool
Return values
bool

setAutoFilter()

Set AutoFilter.

public setAutoFilter( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getPivotTables()

Get PivotTables.

public getPivotTables( ) : bool
Return values
bool

setPivotTables()

Set PivotTables.

public setPivotTables( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getSelectUnlockedCells()

Get SelectUnlockedCells.

public getSelectUnlockedCells( ) : bool
Return values
bool

setSelectUnlockedCells()

Set SelectUnlockedCells.

public setSelectUnlockedCells( $pValue : bool ) : $this
Parameters
$pValue : bool
Return values
$this

getPassword()

Get hashed password.

public getPassword( ) : string
Return values
string

setPassword()

Set Password.

public setPassword( $pValue : string [, $pAlreadyHashed : bool = false ] ) : $this
Parameters
$pValue : string
$pAlreadyHashed : bool = false

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

Return values
$this

generateSalt()

Create a pseudorandom string.

private generateSalt( ) : string
Return values
string

getAlgorithm()

Get algorithm name.

public getAlgorithm( ) : string
Return values
string

setAlgorithm()

Set algorithm name.

public setAlgorithm( $algorithm : string ) : void
Parameters
$algorithm : string

getSalt()

Get salt value.

public getSalt( ) : string
Return values
string

setSalt()

Set salt value.

public setSalt( $salt : string ) : void
Parameters
$salt : string

getSpinCount()

Get spin count.

public getSpinCount( ) : int
Return values
int

setSpinCount()

Set spin count.

public setSpinCount( $spinCount : int ) : void
Parameters
$spinCount : int

verify()

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

public verify( $password : string ) : bool
Parameters
$password : string
Return values
bool

__clone()

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

public __clone( ) : mixed
Return values
mixed

Search results