function read($pgt_iou)
    {
        phpCAS::traceBegin();
        $pgt = false;
        $fname = $this->getPGTIouFilename($pgt_iou);
        if (file_exists($fname)) {
            if (!($f=fopen($fname, "r"))) {
                phpCAS::error('could not open `'.$fname.'\'');
            } else {
                if (($pgt=fgets($f)) === false) {
                    phpCAS::error('could not read PGT from `'.$fname.'\'');
                }
                phpCAS::trace('Successful read of PGT to `'.$fname.'\'');
                fclose($f);
            }
            // delete the PGT file
            @unlink($fname);
        } else {
            phpCAS::error('No such file `'.$fname.'\'');
        }
        phpCAS::traceEnd($pgt);
        return $pgt;
    }
function read($pgt_iou)
    {
        phpCAS::traceBegin();
        $pgt = false;
        $fname = $this->getPGTIouFilename($pgt_iou);
        if (file_exists($fname)) {
            if (!($f=fopen($fname, "r"))) {
                phpCAS::error('could not open `'.$fname.'\'');
            } else {
                if (($pgt=fgets($f)) === false) {
                    phpCAS::error('could not read PGT from `'.$fname.'\'');
                }
                phpCAS::trace('Successful read of PGT to `'.$fname.'\'');
                fclose($f);
            }
            // delete the PGT file
            @unlink($fname);
        } else {
            phpCAS::error('No such file `'.$fname.'\'');
        }
        phpCAS::traceEnd($pgt);
        return $pgt;
    }
function read ( $ pgt_iou ) { phpCAS :: traceBegin ( ) ; $ pgt = false ; $ fname = $ this -> getPGTIouFilename ( $ pgt_iou ) ; if ( file_exists ( $ fname ) ) { if ( ! ( $ f = fopen ( $ fname , "r" ) ) ) { phpCAS :: error ( 'could not open `' . $ fname . '\'' ) ; } else { if ( ( $ pgt = fgets ( $ f ) ) === false ) { phpCAS :: error ( 'could not read PGT from `' . $ fname . '\'' ) ; } phpCAS :: trace ( 'Successful read of PGT to `' . $ fname . '\'' ) ; fclose ( $ f ) ; } // delete the PGT file @ unlink ( $ fname ) ; } else { phpCAS :: error ( 'No such file `' . $ fname . '\'' ) ; } phpCAS :: traceEnd ( $ pgt ) ; return $ pgt ; }
This method reads a PGT corresponding to a PGT Iou and deletes the
corresponding file.

@param string $pgt_iou the PGT iou

@return the corresponding PGT, or FALSE on error

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