Classes | Functions | Variables

PGT storage on the filesystem
[PGT storage]

Classes

class  PGTStorageFile

Functions

 CAS_PGTStorageFile::getPath ()
 CAS_PGTStorageFile::getFormat ()
 CAS_PGTStorageFile::getStorageType ()
 CAS_PGTStorageFile::getStorageInfo ()
 CAS_PGTStorageFile::__construct ($cas_parent, $format, $path)
 CAS_PGTStorageFile::init ()
 CAS_PGTStorageFile::getPGTIouFilename ($pgt_iou)
 CAS_PGTStorageFile::write ($pgt, $pgt_iou)
 CAS_PGTStorageFile::read ($pgt_iou)

Variables

 CAS_PGTStorageFile::$_path
 CAS_PGTStorageFile::$_format

Function Documentation

CAS_PGTStorageFile::__construct ( cas_parent,
format,
path 
) [inherited]

The class constructor, called by CASClient::SetPGTStorageFile().

Parameters:
$cas_parent the CASClient instance that creates the object.
$format the format used to store the PGT's (`plain' and `xml' allowed).
$path the path where the PGT's should be stored

Definition at line 134 of file pgt-file.php.

References phpCAS::error(), phpCAS::traceBegin(), and phpCAS::traceEnd().

CAS_PGTStorageFile::getFormat (  )  [private, inherited]

This method returns the format to use when storing PGT's on the filesystem.

Returns:
a string corresponding to the format used (plain or xml).

Definition at line 88 of file pgt-file.php.

Referenced by CAS_PGTStorageFile::getPGTIouFilename().

CAS_PGTStorageFile::getPath (  )  [private, inherited]

This method returns the name of the directory where PGT's should be stored on the filesystem.

Returns:
the name of a directory (with leading and trailing '/')

Definition at line 68 of file pgt-file.php.

Referenced by CAS_PGTStorageFile::getPGTIouFilename().

CAS_PGTStorageFile::getPGTIouFilename ( pgt_iou  )  [private, inherited]

This method returns the filename corresponding to a PGT Iou.

Parameters:
$pgt_iou the PGT iou.
Returns:
a filename

Definition at line 208 of file pgt-file.php.

References CAS_PGTStorageFile::getFormat(), CAS_PGTStorageFile::getPath(), phpCAS::traceBegin(), and phpCAS::traceEnd().

Referenced by CAS_PGTStorageFile::read(), and CAS_PGTStorageFile::write().

CAS_PGTStorageFile::getStorageInfo (  )  [inherited]

This method returns an informational string giving informations on the parameters of the storage.(used for debugging purposes).

Returns:
an informational string.

Reimplemented from CAS_PGTStorage.

Definition at line 116 of file pgt-file.php.

CAS_PGTStorageFile::getStorageType (  )  [inherited]

This method returns an informational string giving the type of storage used by the object (used for debugging purposes).

Returns:
an informational string.

Reimplemented from CAS_PGTStorage.

Definition at line 104 of file pgt-file.php.

CAS_PGTStorageFile::init (  )  [inherited]

This method is used to initialize the storage. Halts on error.

Reimplemented from CAS_PGTStorage.

Definition at line 185 of file pgt-file.php.

References CAS_PGTStorage::isInitialized(), phpCAS::traceBegin(), and phpCAS::traceEnd().

CAS_PGTStorageFile::read ( pgt_iou  )  [inherited]

This method reads a PGT corresponding to a PGT Iou and deletes the corresponding file.

Parameters:
$pgt_iou the PGT iou
Returns:
the corresponding PGT, or FALSE on error

Reimplemented from CAS_PGTStorage.

Definition at line 254 of file pgt-file.php.

References CAS_PGTStorageFile::getPGTIouFilename(), phpCAS::trace(), phpCAS::traceBegin(), and phpCAS::traceEnd().

CAS_PGTStorageFile::write ( pgt,
pgt_iou 
) [inherited]

This method stores a PGT and its corresponding PGT Iou into a file. Echoes a warning on error.

Parameters:
$pgt the PGT
$pgt_iou the PGT iou

Reimplemented from CAS_PGTStorage.

Definition at line 225 of file pgt-file.php.

References phpCAS::error(), CAS_PGTStorageFile::getPGTIouFilename(), phpCAS::traceBegin(), and phpCAS::traceEnd().


Variable Documentation

CAS_PGTStorageFile::$_format [private, inherited]

a string telling the format to use to store PGT's (plain or xml). Written by PGTStorageFile::PGTStorageFile(), read by getFormat().

Definition at line 79 of file pgt-file.php.

CAS_PGTStorageFile::$_path [private, inherited]

a string telling where PGT's should be stored on the filesystem. Written by PGTStorageFile::PGTStorageFile(), read by getPath().

Definition at line 58 of file pgt-file.php.