ILIAS  release_7 Revision v7.30-3-g800a261c036
AbstractStorage.php
Go to the documentation of this file.
1<?php
2
47{
53 // ########################################################################
54 // CONSTRUCTOR
55 // ########################################################################
56
67 public 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 public function getStorageType()
91 {
92 phpCAS::error(__CLASS__ . '::' . __FUNCTION__ . '() should never be called');
93 }
94
103 public function getStorageInfo()
104 {
105 phpCAS::error(__CLASS__ . '::' . __FUNCTION__ . '() should never be called');
106 }
107
108 // ########################################################################
109 // ERROR HANDLING
110 // ########################################################################
111
119 public $_error_message = false;
120
131 public function setErrorMessage($error_message)
132 {
133 $this->_error_message = $error_message;
134 }
135
144 public function getErrorMessage()
145 {
147 }
148
149 // ########################################################################
150 // INITIALIZATION
151 // ########################################################################
152
159 public $_initialized = false;
160
168 public function isInitialized()
169 {
170 return $this->_initialized;
171 }
172
178 public function init()
179 {
180 $this->_initialized = true;
181 }
182
183 // ########################################################################
184 // PGT I/O
185 // ########################################################################
186
198 public function write($pgt, $pgt_iou)
199 {
200 phpCAS::error(__CLASS__ . '::' . __FUNCTION__ . '() should never be called');
201 }
202
213 public function read($pgt_iou)
214 {
215 phpCAS::error(__CLASS__ . '::' . __FUNCTION__ . '() should never be called');
216 }
217
219}
An exception for terminatinating execution or to throw for unit testing.
Basic class for PGT storage The CAS_PGTStorage_AbstractStorage class is a generic class for PGT stora...
setErrorMessage($error_message)
This method sets en error message, which can be read later by PGTStorage::getErrorMessage().
write($pgt, $pgt_iou)
This virtual method stores a PGT and its corresponding PGT Iuo.
$_initialized
a boolean telling if the storage has already been initialized.
read($pgt_iou)
This virtual method reads a PGT corresponding to a PGT Iou and deletes the corresponding storage entr...
getErrorMessage()
This method returns an error message set by PGTStorage::setErrorMessage().
$_error_message
string used to store an error message.
getStorageInfo()
This virtual method returns an informational string giving informations on the parameters of the stor...
__construct($cas_parent)
The constructor of the class, should be called only by inherited classes.
init()
This virtual method initializes the object.
isInitialized()
This method tells if the storage has already been intialized.
getStorageType()
This virtual method returns an informational string giving the type of storage used by the object (us...
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:658
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode.
Definition: CAS.php:611
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:563