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 ( )

Definition at line 61 of file Security.php.

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

61  : bool
62  {
63  return $this->lockRevision;
64  }

◆ getLockStructure()

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

Definition at line 75 of file Security.php.

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

75  : bool
76  {
77  return $this->lockStructure;
78  }

◆ getLockWindows()

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

Definition at line 89 of file Security.php.

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

89  : bool
90  {
91  return $this->lockWindows;
92  }

◆ getRevisionsPassword()

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

Definition at line 103 of file Security.php.

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

103  : string
104  {
106  }

◆ getWorkbookPassword()

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

Definition at line 120 of file Security.php.

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

120  : string
121  {
123  }

◆ isSecurityEnabled()

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

Is some sort of document security enabled?

Definition at line 54 of file Security.php.

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

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

◆ 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.

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

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.
+ 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.

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

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  }
static hashPassword(string $password, string $algorithm='', string $salt='', int $spinCount=10000)
Create a password hash from a given string by a specific algorithm.
+ 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: