ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
AbstractStorage.php
Go to the documentation of this file.
1 <?php
2 
47 {
53  // ########################################################################
54  // CONSTRUCTOR
55  // ########################################################################
56 
67  function __construct($cas_parent)
68  {
70  if ( !$cas_parent->isProxy() ) {
72  'defining PGT storage makes no sense when not using a CAS proxy'
73  );
74  }
76  }
77 
78  // ########################################################################
79  // DEBUGGING
80  // ########################################################################
81 
90  function getStorageType()
91  {
92  phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
93  }
94 
103  function getStorageInfo()
104  {
105  phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
106  }
107 
108  // ########################################################################
109  // ERROR HANDLING
110  // ########################################################################
111 
119  var $_error_message=false;
120 
131  function setErrorMessage($error_message)
132  {
133  $this->_error_message = $error_message;
134  }
135 
144  function getErrorMessage()
145  {
146  return $this->_error_message;
147  }
148 
149  // ########################################################################
150  // INITIALIZATION
151  // ########################################################################
152 
159  var $_initialized = false;
160 
168  function isInitialized()
169  {
170  return $this->_initialized;
171  }
172 
178  function init()
179  {
180  $this->_initialized = true;
181  }
182 
183  // ########################################################################
184  // PGT I/O
185  // ########################################################################
186 
198  function write($pgt,$pgt_iou)
199  {
200  phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
201  }
202 
213  function read($pgt_iou)
214  {
215  phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called');
216  }
217 
220 }
221 
222 ?>
$_error_message
string used to store an error message.
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
setErrorMessage($error_message)
This method sets en error message, which can be read later by PGTStorage::getErrorMessage().
isInitialized()
This method tells if the storage has already been intialized.
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
write($pgt, $pgt_iou)
This virtual method stores a PGT and its corresponding PGT Iuo.
init()
This virtual method initializes the object.
getStorageInfo()
This virtual method returns an informational string giving informations on the parameters of the stor...
getErrorMessage()
This method returns an error message set by PGTStorage::setErrorMessage().
Basic class for PGT storage The CAS_PGTStorage_AbstractStorage class is a generic class for PGT stora...
read($pgt_iou)
This virtual method reads a PGT corresponding to a PGT Iou and deletes the corresponding storage entr...
__construct($cas_parent)
The constructor of the class, should be called only by inherited classes.
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
getStorageType()
This virtual method returns an informational string giving the type of storage used by the object (us...
$_initialized
a boolean telling if the storage has already been initialized.