ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
DocumentSecurity.php
Go to the documentation of this file.
1 <?php
30 if (!defined('PHPEXCEL_ROOT')) {
34  define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
35 }
36 
38 require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/PasswordHasher.php';
39 
40 
49 {
55  private $_lockRevision;
56 
62  private $_lockStructure;
63 
69  private $_lockWindows;
70 
77 
84 
88  public function __construct()
89  {
90  // Initialise values
91  $this->_lockRevision = false;
92  $this->_lockStructure = false;
93  $this->_lockWindows = false;
94  $this->_revisionsPassword = '';
95  $this->_workbookPassword = '';
96  }
97 
103  function isSecurityEnabled() {
104  return $this->_lockRevision ||
105  $this->_lockStructure ||
107  }
108 
114  function getLockRevision() {
115  return $this->_lockRevision;
116  }
117 
124  function setLockRevision($pValue = false) {
125  $this->_lockRevision = $pValue;
126  return $this;
127  }
128 
134  function getLockStructure() {
135  return $this->_lockStructure;
136  }
137 
144  function setLockStructure($pValue = false) {
145  $this->_lockStructure = $pValue;
146  return $this;
147  }
148 
154  function getLockWindows() {
155  return $this->_lockWindows;
156  }
157 
164  function setLockWindows($pValue = false) {
165  $this->_lockWindows = $pValue;
166  return $this;
167  }
168 
174  function getRevisionsPassword() {
176  }
177 
185  function setRevisionsPassword($pValue = '', $pAlreadyHashed = false) {
186  if (!$pAlreadyHashed) {
188  }
189  $this->_revisionsPassword = $pValue;
190  return $this;
191  }
192 
198  function getWorkbookPassword() {
200  }
201 
209  function setWorkbookPassword($pValue = '', $pAlreadyHashed = false) {
210  if (!$pAlreadyHashed) {
212  }
213  $this->_workbookPassword = $pValue;
214  return $this;
215  }
216 
220  public function __clone() {
221  $vars = get_object_vars($this);
222  foreach ($vars as $key => $value) {
223  if (is_object($value)) {
224  $this->$key = clone $value;
225  } else {
226  $this->$key = $value;
227  }
228  }
229  }
230 }