ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PhpOffice\PhpSpreadsheet\Document\Security Class Reference
+ Collaboration diagram for PhpOffice\PhpSpreadsheet\Document\Security:

Public Member Functions

 __construct ()
 Create a new Document Security instance. More...
 
 isSecurityEnabled ()
 Is some sort of document security enabled? More...
 
 getLockRevision ()
 
 setLockRevision (?bool $pValue)
 
 getLockStructure ()
 
 setLockStructure (?bool $pValue)
 
 getLockWindows ()
 
 setLockWindows (?bool $pValue)
 
 getRevisionsPassword ()
 
 setRevisionsPassword (?string $pValue, bool $pAlreadyHashed=false)
 
 getWorkbookPassword ()
 
 setWorkbookPassword (?string $pValue, bool $pAlreadyHashed=false)
 

Private Attributes

 $lockRevision = false
 
 $lockStructure = false
 
 $lockWindows = false
 
 $revisionsPassword = ''
 
 $workbookPassword = ''
 

Detailed Description

Definition at line 7 of file Security.php.

Constructor & Destructor Documentation

◆ __construct()

PhpOffice\PhpSpreadsheet\Document\Security::__construct ( )

Create a new Document Security instance.

Definition at line 47 of file Security.php.

48 {
49 }

Member Function Documentation

◆ getLockRevision()

PhpOffice\PhpSpreadsheet\Document\Security::getLockRevision ( )

◆ getLockStructure()

PhpOffice\PhpSpreadsheet\Document\Security::getLockStructure ( )

◆ getLockWindows()

PhpOffice\PhpSpreadsheet\Document\Security::getLockWindows ( )

◆ getRevisionsPassword()

PhpOffice\PhpSpreadsheet\Document\Security::getRevisionsPassword ( )

◆ getWorkbookPassword()

PhpOffice\PhpSpreadsheet\Document\Security::getWorkbookPassword ( )

◆ isSecurityEnabled()

PhpOffice\PhpSpreadsheet\Document\Security::isSecurityEnabled ( )

Is some sort of document security enabled?

Definition at line 54 of file Security.php.

54 : bool
55 {
56 return $this->lockRevision ||
57 $this->lockStructure ||
59 }

References PhpOffice\PhpSpreadsheet\Document\Security\$lockWindows.

◆ setLockRevision()

PhpOffice\PhpSpreadsheet\Document\Security::setLockRevision ( ?bool  $pValue)

Definition at line 66 of file Security.php.

66 : self
67 {
68 if ($pValue !== null) {
69 $this->lockRevision = $pValue;
70 }
71
72 return $this;
73 }

◆ setLockStructure()

PhpOffice\PhpSpreadsheet\Document\Security::setLockStructure ( ?bool  $pValue)

Definition at line 80 of file Security.php.

80 : self
81 {
82 if ($pValue !== null) {
83 $this->lockStructure = $pValue;
84 }
85
86 return $this;
87 }

◆ setLockWindows()

PhpOffice\PhpSpreadsheet\Document\Security::setLockWindows ( ?bool  $pValue)

Definition at line 94 of file Security.php.

94 : self
95 {
96 if ($pValue !== null) {
97 $this->lockWindows = $pValue;
98 }
99
100 return $this;
101 }

◆ setRevisionsPassword()

PhpOffice\PhpSpreadsheet\Document\Security::setRevisionsPassword ( ?string  $pValue,
bool  $pAlreadyHashed = false 
)

Definition at line 108 of file Security.php.

108 : self
109 {
110 if ($pValue !== null) {
111 if (!$pAlreadyHashed) {
112 $pValue = PasswordHasher::hashPassword($pValue);
113 }
114 $this->revisionsPassword = $pValue;
115 }
116
117 return $this;
118 }
static hashPassword(string $password, string $algorithm='', string $salt='', int $spinCount=10000)
Create a password hash from a given string by a specific algorithm.

References PhpOffice\PhpSpreadsheet\Shared\PasswordHasher\hashPassword().

+ Here is the call graph for this function:

◆ setWorkbookPassword()

PhpOffice\PhpSpreadsheet\Document\Security::setWorkbookPassword ( ?string  $pValue,
bool  $pAlreadyHashed = false 
)

Definition at line 125 of file Security.php.

125 : self
126 {
127 if ($pValue !== null) {
128 if (!$pAlreadyHashed) {
129 $pValue = PasswordHasher::hashPassword($pValue);
130 }
131 $this->workbookPassword = $pValue;
132 }
133
134 return $this;
135 }

References PhpOffice\PhpSpreadsheet\Shared\PasswordHasher\hashPassword().

+ Here is the call graph for this function:

Field Documentation

◆ $lockRevision

PhpOffice\PhpSpreadsheet\Document\Security::$lockRevision = false
private

◆ $lockStructure

PhpOffice\PhpSpreadsheet\Document\Security::$lockStructure = false
private

◆ $lockWindows

PhpOffice\PhpSpreadsheet\Document\Security::$lockWindows = false
private

◆ $revisionsPassword

PhpOffice\PhpSpreadsheet\Document\Security::$revisionsPassword = ''
private

◆ $workbookPassword

PhpOffice\PhpSpreadsheet\Document\Security::$workbookPassword = ''
private

The documentation for this class was generated from the following file: