Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Licensed to Jasig under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Jasig licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

Author: Pascal Aubry <pascal.aubry@univ-rennes1.fr>
License: http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
File Size: 261 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

CAS_PGTStorage_File:: (8 methods):
  getPath()
  getStorageType()
  getStorageInfo()
  __construct()
  init()
  getPGTIouFilename()
  write()
  read()


Class: CAS_PGTStorage_File  - X-Ref

The CAS_PGTStorage_File class is a class for PGT file storage. An instance of
this class is returned by CAS_Client::SetPGTStorageFile().

getPath()   X-Ref
This method returns the name of the directory where PGT's should be stored
on the filesystem.

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

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

return: string an informational string.

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

return: string an informational string.

__construct($cas_parent,$path)   X-Ref
The class constructor, called by CAS_Client::SetPGTStorageFile().

param: CAS_Client $cas_parent the CAS_Client instance that creates the object.
param: string     $path       the path where the PGT's should be stored
return: void

init()   X-Ref
This method is used to initialize the storage. Halts on error.

return: void

getPGTIouFilename($pgt_iou)   X-Ref
This method returns the filename corresponding to a PGT Iou.

param: string $pgt_iou the PGT iou.
return: string a filename

write($pgt,$pgt_iou)   X-Ref
This method stores a PGT and its corresponding PGT Iou into a file. Echoes a
warning on error.

param: string $pgt     the PGT
param: string $pgt_iou the PGT iou
return: void

read($pgt_iou)   X-Ref
This method reads a PGT corresponding to a PGT Iou and deletes the
corresponding file.

param: string $pgt_iou the PGT iou
return: string|false the corresponding PGT, or FALSE on error