91 return 'path=`'.$this->getPath().
'\', format=`
'.$this->getFormat().'\
'';
117 if (
$path[0] !=
'/' ) {
118 phpCAS::error(
'an absolute path is needed for PGT storage to file');
124 $this->_path =
$path;
130 $this->_format = $format;
190 if ( $f=fopen($fname,
"w") ) {
191 if ( fputs($f,$pgt) === FALSE ) {
216 if ( !($f=fopen($fname,
"r")) ) {
219 if ( ($pgt=fgets($f)) === FALSE ) {
const CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT
Default format used when storing PGT's to file.
getStorageInfo()
This method returns an informational string giving informations on the parameters of the storage...
getPath()
This method returns the name of the directory where PGT's should be stored on the filesystem...
getStorageType()
This method returns an informational string giving the type of storage used by the object (used for d...
init()
This method is used to initialize the storage.
const CAS_PGT_STORAGE_FILE_DEFAULT_PATH
Default path used when storing PGT's to file.
getPath()
This method returns the name of the directory where PGT's should be stored on the filesystem...
read($pgt_iou)
This method reads a PGT corresponding to a PGT Iou and deletes the corresponding file.
write($pgt, $pgt_iou)
This method stores a PGT and its corresponding PGT Iou into a file.
$_path
a string telling where PGT's should be stored on the filesystem.
traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
getPGTIouFilename($pgt_iou)
This method returns the filename corresponding to a PGT Iou.
getFormat()
This method returns the format to use when storing PGT's on the filesystem.
The PGTStorageFile class is a class for PGT file storage.
const CAS_PGT_STORAGE_FILE_FORMAT_XML
phpCAS::setPGTStorageFile()'s 2nd parameter to write xml files
PGTStorage($cas_parent)
The constructor of the class, should be called only by inherited classes.
getPGTIouFilename($pgt_iou)
This method returns the filename corresponding to a PGT Iou.
traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
error($msg)
This method is used by interface methods to print an error and where the function was originally call...
trace($str)
This method is used to log something in debug mode.
getFormat()
This method returns the format to use when storing PGT's on the filesystem.
const CAS_PGT_STORAGE_FILE_FORMAT_PLAIN
phpCAS::setPGTStorageFile()'s 2nd parameter to write plain text files
PGTStorageFile($cas_parent, $format, $path)
The class constructor, called by CASClient::SetPGTStorageFile().
isInitialized()
This method tells if the storage has already been intialized.
The PGTStorage class is a generic class for PGT storage.
$_format
a string telling the format to use to store PGT's (plain or xml).