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_MD2
mixed
$ALGORITHM_MD2
= 'MD2'
ALGORITHM_MD4
mixed
$ALGORITHM_MD4
= 'MD4'
ALGORITHM_MD5
mixed
$ALGORITHM_MD5
= 'MD5'
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
$sheet
Sheet.
private
bool
$sheet
= false
$objects
Objects.
private
bool
$objects
= false
$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
$sort
Sort.
private
bool
$sort
= 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
= ''
$salt
Salt value.
private
string
$salt
= ''
$spinCount
Spin count.
private
int
$spinCount
= 10000
Methods
__construct()
Create a new Protection.
public
__construct(
)
: mixed
Return values
mixedisProtectionEnabled()
Is some sort of protection enabled?
public
isProtectionEnabled(
)
: bool
Return values
boolgetSheet()
Get Sheet.
public
getSheet(
)
: bool
Return values
boolsetSheet()
Set Sheet.
public
setSheet(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetObjects()
Get Objects.
public
getObjects(
)
: bool
Return values
boolsetObjects()
Set Objects.
public
setObjects(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetScenarios()
Get Scenarios.
public
getScenarios(
)
: bool
Return values
boolsetScenarios()
Set Scenarios.
public
setScenarios(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetFormatCells()
Get FormatCells.
public
getFormatCells(
)
: bool
Return values
boolsetFormatCells()
Set FormatCells.
public
setFormatCells(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetFormatColumns()
Get FormatColumns.
public
getFormatColumns(
)
: bool
Return values
boolsetFormatColumns()
Set FormatColumns.
public
setFormatColumns(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetFormatRows()
Get FormatRows.
public
getFormatRows(
)
: bool
Return values
boolsetFormatRows()
Set FormatRows.
public
setFormatRows(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetInsertColumns()
Get InsertColumns.
public
getInsertColumns(
)
: bool
Return values
boolsetInsertColumns()
Set InsertColumns.
public
setInsertColumns(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetInsertRows()
Get InsertRows.
public
getInsertRows(
)
: bool
Return values
boolsetInsertRows()
Set InsertRows.
public
setInsertRows(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetInsertHyperlinks()
Get InsertHyperlinks.
public
getInsertHyperlinks(
)
: bool
Return values
boolsetInsertHyperlinks()
Set InsertHyperlinks.
public
setInsertHyperlinks(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetDeleteColumns()
Get DeleteColumns.
public
getDeleteColumns(
)
: bool
Return values
boolsetDeleteColumns()
Set DeleteColumns.
public
setDeleteColumns(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetDeleteRows()
Get DeleteRows.
public
getDeleteRows(
)
: bool
Return values
boolsetDeleteRows()
Set DeleteRows.
public
setDeleteRows(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetSelectLockedCells()
Get SelectLockedCells.
public
getSelectLockedCells(
)
: bool
Return values
boolsetSelectLockedCells()
Set SelectLockedCells.
public
setSelectLockedCells(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetSort()
Get Sort.
public
getSort(
)
: bool
Return values
boolsetSort()
Set Sort.
public
setSort(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetAutoFilter()
Get AutoFilter.
public
getAutoFilter(
)
: bool
Return values
boolsetAutoFilter()
Set AutoFilter.
public
setAutoFilter(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetPivotTables()
Get PivotTables.
public
getPivotTables(
)
: bool
Return values
boolsetPivotTables()
Set PivotTables.
public
setPivotTables(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetSelectUnlockedCells()
Get SelectUnlockedCells.
public
getSelectUnlockedCells(
)
: bool
Return values
boolsetSelectUnlockedCells()
Set SelectUnlockedCells.
public
setSelectUnlockedCells(
$pValue :
bool
)
: $this
Parameters
- $pValue : bool
Return values
$thisgetPassword()
Get hashed password.
public
getPassword(
)
: string
Return values
stringsetPassword()
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
$thisgenerateSalt()
Create a pseudorandom string.
private
generateSalt(
)
: string
Return values
stringgetAlgorithm()
Get algorithm name.
public
getAlgorithm(
)
: string
Return values
stringsetAlgorithm()
Set algorithm name.
public
setAlgorithm(
$algorithm :
string
)
: void
Parameters
- $algorithm : string
getSalt()
Get salt value.
public
getSalt(
)
: string
Return values
stringsetSalt()
Set salt value.
public
setSalt(
$salt :
string
)
: void
Parameters
- $salt : string
getSpinCount()
Get spin count.
public
getSpinCount(
)
: int
Return values
intsetSpinCount()
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