Protection
in package
Table of Contents
Constants
- ALGORITHM_MD2 = 'MD2'
- ALGORITHM_MD4 = 'MD4'
- ALGORITHM_MD5 = 'MD5'
- ALGORITHM_RIPEMD_128 = 'RIPEMD-128'
- ALGORITHM_RIPEMD_160 = 'RIPEMD-160'
- ALGORITHM_SHA_1 = 'SHA-1'
- ALGORITHM_SHA_256 = 'SHA-256'
- ALGORITHM_SHA_384 = 'SHA-384'
- ALGORITHM_SHA_512 = 'SHA-512'
- ALGORITHM_WHIRLPOOL = 'WHIRLPOOL'
Properties
- $algorithm : string
- Algorithm name.
- $autoFilter : bool|null
- Autofilters are locked when sheet is protected, default true.
- $deleteColumns : bool|null
- Deleting columns is locked when sheet is protected, default true.
- $deleteRows : bool|null
- Deleting rows is locked when sheet is protected, default true.
- $formatCells : bool|null
- Formatting cells is locked when sheet is protected, default true.
- $formatColumns : bool|null
- Formatting columns is locked when sheet is protected, default true.
- $formatRows : bool|null
- Formatting rows is locked when sheet is protected, default true.
- $insertColumns : bool|null
- Inserting columns is locked when sheet is protected, default true.
- $insertHyperlinks : bool|null
- Inserting hyperlinks is locked when sheet is protected, default true.
- $insertRows : bool|null
- Inserting rows is locked when sheet is protected, default true.
- $objects : bool|null
- Objects are locked when sheet is protected, default false.
- $password : string
- Hashed password.
- $pivotTables : bool|null
- Pivot tables are locked when the sheet is protected, default true.
- $salt : string
- Salt value.
- $scenarios : bool|null
- Scenarios are locked when sheet is protected, default false.
- $selectLockedCells : bool|null
- Selection of locked cells is locked when sheet is protected, default false.
- $selectUnlockedCells : bool|null
- Selection of unlocked cells is locked when sheet is protected, default false.
- $sheet : bool|null
- Sheet is locked when sheet is protected, default false.
- $sort : bool|null
- Sorting is locked when sheet is protected, default true.
- $spinCount : int
- Spin count.
Methods
- __clone() : mixed
- Implement PHP __clone to create a deep clone, not just a shallow copy.
- __construct() : mixed
- Create a new Protection.
- getAlgorithm() : string
- Get algorithm name.
- getAutoFilter() : bool|null
- getDeleteColumns() : bool|null
- getDeleteRows() : bool|null
- getFormatCells() : bool|null
- getFormatColumns() : bool|null
- getFormatRows() : bool|null
- getInsertColumns() : bool|null
- getInsertHyperlinks() : bool|null
- getInsertRows() : bool|null
- getObjects() : bool|null
- getPassword() : string
- Get hashed password.
- getPivotTables() : bool|null
- getSalt() : string
- getScenarios() : bool|null
- getSelectLockedCells() : bool|null
- getSelectUnlockedCells() : bool|null
- getSheet() : bool|null
- getSort() : bool|null
- getSpinCount() : int
- Get spin count.
- isProtectionEnabled() : bool
- Is some sort of protection enabled?
- setAlgorithm() : self
- Set algorithm name.
- setAlgorithmName() : self
- Set algorithm name.
- setAutoFilter() : self
- setDeleteColumns() : self
- setDeleteRows() : self
- setFormatCells() : self
- setFormatColumns() : self
- setFormatRows() : self
- setHashValue() : self
- setInsertColumns() : self
- setInsertHyperlinks() : self
- setInsertRows() : self
- setObjects() : self
- setPassword() : $this
- Set Password.
- setPivotTables() : self
- setSalt() : self
- setSaltValue() : self
- setScenarios() : self
- setSelectLockedCells() : self
- setSelectUnlockedCells() : self
- setSheet() : self
- setSort() : self
- setSpinCount() : self
- Set spin count.
- verify() : bool
- Verify that the given non-hashed password can "unlock" the protection.
- generateSalt() : string
- Create a pseudorandom string.
Constants
ALGORITHM_MD2
public
mixed
ALGORITHM_MD2
= 'MD2'
ALGORITHM_MD4
public
mixed
ALGORITHM_MD4
= 'MD4'
ALGORITHM_MD5
public
mixed
ALGORITHM_MD5
= 'MD5'
ALGORITHM_RIPEMD_128
public
mixed
ALGORITHM_RIPEMD_128
= 'RIPEMD-128'
ALGORITHM_RIPEMD_160
public
mixed
ALGORITHM_RIPEMD_160
= 'RIPEMD-160'
ALGORITHM_SHA_1
public
mixed
ALGORITHM_SHA_1
= 'SHA-1'
ALGORITHM_SHA_256
public
mixed
ALGORITHM_SHA_256
= 'SHA-256'
ALGORITHM_SHA_384
public
mixed
ALGORITHM_SHA_384
= 'SHA-384'
ALGORITHM_SHA_512
public
mixed
ALGORITHM_SHA_512
= 'SHA-512'
ALGORITHM_WHIRLPOOL
public
mixed
ALGORITHM_WHIRLPOOL
= 'WHIRLPOOL'
Properties
$algorithm
Algorithm name.
private
string
$algorithm
= ''
$autoFilter
Autofilters are locked when sheet is protected, default true.
private
bool|null
$autoFilter
= null
$deleteColumns
Deleting columns is locked when sheet is protected, default true.
private
bool|null
$deleteColumns
= null
$deleteRows
Deleting rows is locked when sheet is protected, default true.
private
bool|null
$deleteRows
= null
$formatCells
Formatting cells is locked when sheet is protected, default true.
private
bool|null
$formatCells
= null
$formatColumns
Formatting columns is locked when sheet is protected, default true.
private
bool|null
$formatColumns
= null
$formatRows
Formatting rows is locked when sheet is protected, default true.
private
bool|null
$formatRows
= null
$insertColumns
Inserting columns is locked when sheet is protected, default true.
private
bool|null
$insertColumns
= null
$insertHyperlinks
Inserting hyperlinks is locked when sheet is protected, default true.
private
bool|null
$insertHyperlinks
= null
$insertRows
Inserting rows is locked when sheet is protected, default true.
private
bool|null
$insertRows
= null
$objects
Objects are locked when sheet is protected, default false.
private
bool|null
$objects
= null
$password
Hashed password.
private
string
$password
= ''
$pivotTables
Pivot tables are locked when the sheet is protected, default true.
private
bool|null
$pivotTables
= null
$salt
Salt value.
private
string
$salt
= ''
$scenarios
Scenarios are locked when sheet is protected, default false.
private
bool|null
$scenarios
= null
$selectLockedCells
Selection of locked cells is locked when sheet is protected, default false.
private
bool|null
$selectLockedCells
= null
$selectUnlockedCells
Selection of unlocked cells is locked when sheet is protected, default false.
private
bool|null
$selectUnlockedCells
= null
$sheet
Sheet is locked when sheet is protected, default false.
private
bool|null
$sheet
= null
$sort
Sorting is locked when sheet is protected, default true.
private
bool|null
$sort
= null
$spinCount
Spin count.
private
int
$spinCount
= 10000
Methods
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
public
__clone() : mixed
__construct()
Create a new Protection.
public
__construct() : mixed
getAlgorithm()
Get algorithm name.
public
getAlgorithm() : string
Return values
stringgetAutoFilter()
public
getAutoFilter() : bool|null
Return values
bool|nullgetDeleteColumns()
public
getDeleteColumns() : bool|null
Return values
bool|nullgetDeleteRows()
public
getDeleteRows() : bool|null
Return values
bool|nullgetFormatCells()
public
getFormatCells() : bool|null
Return values
bool|nullgetFormatColumns()
public
getFormatColumns() : bool|null
Return values
bool|nullgetFormatRows()
public
getFormatRows() : bool|null
Return values
bool|nullgetInsertColumns()
public
getInsertColumns() : bool|null
Return values
bool|nullgetInsertHyperlinks()
public
getInsertHyperlinks() : bool|null
Return values
bool|nullgetInsertRows()
public
getInsertRows() : bool|null
Return values
bool|nullgetObjects()
public
getObjects() : bool|null
Return values
bool|nullgetPassword()
Get hashed password.
public
getPassword() : string
Return values
stringgetPivotTables()
public
getPivotTables() : bool|null
Return values
bool|nullgetSalt()
public
getSalt() : string
Return values
stringgetScenarios()
public
getScenarios() : bool|null
Return values
bool|nullgetSelectLockedCells()
public
getSelectLockedCells() : bool|null
Return values
bool|nullgetSelectUnlockedCells()
public
getSelectUnlockedCells() : bool|null
Return values
bool|nullgetSheet()
public
getSheet() : bool|null
Return values
bool|nullgetSort()
public
getSort() : bool|null
Return values
bool|nullgetSpinCount()
Get spin count.
public
getSpinCount() : int
Return values
intisProtectionEnabled()
Is some sort of protection enabled?
public
isProtectionEnabled() : bool
Return values
boolsetAlgorithm()
Set algorithm name.
public
setAlgorithm(string $algorithm) : self
Parameters
- $algorithm : string
Return values
selfsetAlgorithmName()
Set algorithm name.
public
setAlgorithmName(string $algorithm) : self
Parameters
- $algorithm : string
Return values
selfsetAutoFilter()
public
setAutoFilter(bool|null $autoFilter) : self
Parameters
- $autoFilter : bool|null
Return values
selfsetDeleteColumns()
public
setDeleteColumns(bool|null $deleteColumns) : self
Parameters
- $deleteColumns : bool|null
Return values
selfsetDeleteRows()
public
setDeleteRows(bool|null $deleteRows) : self
Parameters
- $deleteRows : bool|null
Return values
selfsetFormatCells()
public
setFormatCells(bool|null $formatCells) : self
Parameters
- $formatCells : bool|null
Return values
selfsetFormatColumns()
public
setFormatColumns(bool|null $formatColumns) : self
Parameters
- $formatColumns : bool|null
Return values
selfsetFormatRows()
public
setFormatRows(bool|null $formatRows) : self
Parameters
- $formatRows : bool|null
Return values
selfsetHashValue()
public
setHashValue(string $password) : self
Parameters
- $password : string
Return values
selfsetInsertColumns()
public
setInsertColumns(bool|null $insertColumns) : self
Parameters
- $insertColumns : bool|null
Return values
selfsetInsertHyperlinks()
public
setInsertHyperlinks(bool|null $insertHyperLinks) : self
Parameters
- $insertHyperLinks : bool|null
Return values
selfsetInsertRows()
public
setInsertRows(bool|null $insertRows) : self
Parameters
- $insertRows : bool|null
Return values
selfsetObjects()
public
setObjects(bool|null $objects) : self
Parameters
- $objects : bool|null
Return values
selfsetPassword()
Set Password.
public
setPassword(string $password[, bool $alreadyHashed = false ]) : $this
Parameters
- $password : string
- $alreadyHashed : bool = false
-
If the password has already been hashed, set this to true
Return values
$thissetPivotTables()
public
setPivotTables(bool|null $pivotTables) : self
Parameters
- $pivotTables : bool|null
Return values
selfsetSalt()
public
setSalt(string $salt) : self
Parameters
- $salt : string
Return values
selfsetSaltValue()
public
setSaltValue(string $salt) : self
Parameters
- $salt : string
Return values
selfsetScenarios()
public
setScenarios(bool|null $scenarios) : self
Parameters
- $scenarios : bool|null
Return values
selfsetSelectLockedCells()
public
setSelectLockedCells(bool|null $selectLockedCells) : self
Parameters
- $selectLockedCells : bool|null
Return values
selfsetSelectUnlockedCells()
public
setSelectUnlockedCells(bool|null $selectUnlockedCells) : self
Parameters
- $selectUnlockedCells : bool|null
Return values
selfsetSheet()
public
setSheet(bool|null $sheet) : self
Parameters
- $sheet : bool|null
Return values
selfsetSort()
public
setSort(bool|null $sort) : self
Parameters
- $sort : bool|null
Return values
selfsetSpinCount()
Set spin count.
public
setSpinCount(int $spinCount) : self
Parameters
- $spinCount : int
Return values
selfverify()
Verify that the given non-hashed password can "unlock" the protection.
public
verify(string $password) : bool
Parameters
- $password : string
Return values
boolgenerateSalt()
Create a pseudorandom string.
private
generateSalt() : string