ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
DocumentSecurity.php
Go to the documentation of this file.
1 <?php
37 {
43  private $_lockRevision;
44 
50  private $_lockStructure;
51 
57  private $_lockWindows;
58 
65 
72 
76  public function __construct()
77  {
78  // Initialise values
79  $this->_lockRevision = false;
80  $this->_lockStructure = false;
81  $this->_lockWindows = false;
82  $this->_revisionsPassword = '';
83  $this->_workbookPassword = '';
84  }
85 
91  function isSecurityEnabled() {
92  return $this->_lockRevision ||
93  $this->_lockStructure ||
95  }
96 
102  function getLockRevision() {
103  return $this->_lockRevision;
104  }
105 
112  function setLockRevision($pValue = false) {
113  $this->_lockRevision = $pValue;
114  return $this;
115  }
116 
122  function getLockStructure() {
123  return $this->_lockStructure;
124  }
125 
132  function setLockStructure($pValue = false) {
133  $this->_lockStructure = $pValue;
134  return $this;
135  }
136 
142  function getLockWindows() {
143  return $this->_lockWindows;
144  }
145 
152  function setLockWindows($pValue = false) {
153  $this->_lockWindows = $pValue;
154  return $this;
155  }
156 
162  function getRevisionsPassword() {
164  }
165 
173  function setRevisionsPassword($pValue = '', $pAlreadyHashed = false) {
174  if (!$pAlreadyHashed) {
176  }
177  $this->_revisionsPassword = $pValue;
178  return $this;
179  }
180 
186  function getWorkbookPassword() {
188  }
189 
197  function setWorkbookPassword($pValue = '', $pAlreadyHashed = false) {
198  if (!$pAlreadyHashed) {
200  }
201  $this->_workbookPassword = $pValue;
202  return $this;
203  }
204 
208  public function __clone() {
209  $vars = get_object_vars($this);
210  foreach ($vars as $key => $value) {
211  if (is_object($value)) {
212  $this->$key = clone $value;
213  } else {
214  $this->$key = $value;
215  }
216  }
217  }
218 }